OLD | NEW |
1 .. _overview: | 1 .. _overview: |
2 | 2 |
3 ################## | 3 ################## |
4 Technical Overview | 4 Technical Overview |
5 ################## | 5 ################## |
6 | 6 |
7 .. contents:: | 7 .. contents:: |
8 :local: | 8 :local: |
9 :backlinks: none | 9 :backlinks: none |
10 :depth: 2 | 10 :depth: 2 |
(...skipping 20 matching lines...) Expand all Loading... |
31 additional languages are developed, the SDK will be updated to support those | 31 additional languages are developed, the SDK will be updated to support those |
32 languages as well. | 32 languages as well. |
33 | 33 |
34 .. image:: /images/web-app-with-nacl.png | 34 .. image:: /images/web-app-with-nacl.png |
35 | 35 |
36 Why use Native Client? | 36 Why use Native Client? |
37 ====================== | 37 ====================== |
38 | 38 |
39 Native Client open-source technology is designed to run compiled code | 39 Native Client open-source technology is designed to run compiled code |
40 securely inside a browser at near-native speeds. Native Client puts web | 40 securely inside a browser at near-native speeds. Native Client puts web |
41 applications on the same playing field as traditional (locally-run) | 41 applications on the same playing field as desktop software---it provides the |
42 software---it provides the means to fully harness the client's computational | 42 means to fully harness the client's computational resources for applications |
43 resources for applications such as 3D games, multimedia editors, CAD modeling, | 43 such as 3D games, multimedia editors, CAD modeling, |
44 client-side data analytics, and interactive simulations. | 44 client-side data analytics, and interactive simulations. |
45 Native Client also aims to give C and C++ (and eventually other languages) the | 45 Native Client also aims to give C and C++ (and eventually other languages) the |
46 same level of portability and safety that JavaScript provides on the web today. | 46 same level of portability and safety that JavaScript provides on the web today. |
47 | 47 |
48 Here are a few of the key benefits that Native Client offers: | 48 Important benefits of Native Client include: |
49 | 49 |
50 * **Graphics, audio, and much more:** Run native code modules that render 2D | 50 * **Graphics, audio, and much more:** Running native code modules that render 2D |
51 and 3D graphics, play audio, respond to mouse and keyboard events, run on | 51 and 3D graphics, play audio, respond to mouse and keyboard events, run on |
52 multiple threads, and access memory directly---all without requiring | 52 multiple threads, and access memory directly---all without requiring |
53 the user to install a plugin. | 53 the user to install a plugin. |
54 * **Portability:** Write your applications once and you'll be able to run them | 54 * **Portability:** Writing your applications once and running them on operating |
55 across operating systems (Windows, Linux, Mac, and Chrome OS) and CPU | 55 systems (Windows, Linux, Mac, and Chrome OS) and CPU architectures (x86 and |
56 architectures (x86 and ARM). | 56 ARM). |
57 * **Easy migration path to the web:** Many developers and companies have years | 57 * **Easy migration path to the web:** Leveraging years of work in existing |
58 of work invested in existing desktop applications. Native Client makes the | 58 desktop applications. Native Client makes the transition from the desktop to a |
59 transition from the desktop to a web application significantly easier because | 59 web application significantly easier because it supports C and C++. |
60 it supports C and C++. | 60 * **Security:** Protecting the user's system from malicious or buggy |
61 * **Security:** Native Client uses a double sandbox model designed to protect | 61 applications through Native Client's double sandbox model. This model offers |
62 the user's system from malicious or buggy applications. This model offers the | 62 the safety of traditional web applications without sacrificing performance and |
63 safety of traditional web applications without sacrificing performance and | |
64 without requiring users to install a plugin. | 63 without requiring users to install a plugin. |
65 * **Performance:** Native Client allows web applications to run at speeds | 64 * **Performance:** Running at speeds comparable to desktop applications (within |
66 comparable to desktop applications (within 5-15% of native speed). | 65 5-15% of native speed). Native Client also allows applications to harness all |
67 Native Client also allows applications to harness all available CPU cores via | 66 available CPU cores via a threading API; this enables demanding applications |
68 a threading API; this enables demanding applications such as console-quality | 67 such as console-quality games to run inside the browser. |
69 games to run inside the browser. | |
70 | 68 |
71 Common use cases | 69 Common use cases |
72 ================ | 70 ================ |
73 | 71 |
74 Typical use cases for Native Client include the following: | 72 Typical use cases for Native Client include the following: |
75 | 73 |
76 * **Existing software components:** With support for C and C++, Native | 74 * **Existing software components:** With support for C and C++, Native |
77 Client enables you to reuse existing software modules in | 75 Client lets you to reuse existing software modules in web applications. You |
78 web applications---you don't need to rewrite and debug code | 76 don't need to rewrite and debug code that already works. |
79 that's already proven to work well. | |
80 * **Legacy desktop applications:** Native Client provides a smooth migration | 77 * **Legacy desktop applications:** Native Client provides a smooth migration |
81 path from desktop applications to the web. You can port and recompile existing | 78 path from desktop applications to the web. You can port and recompile existing |
82 code for the computation engine of your application directly to Native Client, | 79 code for the computation engine of your application directly to Native Client, |
83 and need repurpose only the user interface and event handling portions to the | 80 and need rebuild only the user interface and event handling portions for the |
84 new browser platform. Native Client allows you to embed existing functionality | 81 browser. |
85 directly into the browser. At the same time, your application can take | |
86 advantage of things the browser does well: handling user interaction and | |
87 processing events, based on the latest developments in HTML5. | |
88 * **Heavy computation in enterprise applications:** Native Client can handle the | 82 * **Heavy computation in enterprise applications:** Native Client can handle the |
89 number crunching required by large-scale enterprise applications. To ensure | 83 number crunching required by large-scale enterprise applications. To ensure |
90 protection of user data, Native Client enables you to build complex | 84 protection of user data, Native Client enables you to build complex |
91 cryptographic algorithms directly into the browser so that unencrypted data | 85 cryptographic algorithms directly into the browser so that unencrypted data |
92 never goes out over the network. | 86 never goes out over the network. |
93 * **Multimedia applications:** Codecs for processing sounds, images, and movies | 87 * **Multimedia applications:** Codecs for processing sounds, images, and movies |
94 can be added to the browser in a Native Client module. | 88 can be added to the browser in a Native Client module. |
95 * **Games:** Native Client lets web applications run at close to native | 89 * **Games:** Native Client lets web applications run at close to native |
96 speed, reuse existing multithreaded/multicore C/C++ code bases, and | 90 speed, reuse existing multithreaded/multicore C/C++ code bases, and |
97 access low-latency audio, networking APIs, and OpenGL ES with programmable | 91 access low-latency audio, networking APIs, and OpenGL ES with programmable |
98 shaders. Native Client is a natural fit for running a physics engine or | 92 shaders. Native Client is a natural fit for running a physics engine or |
99 artificial intelligence module that powers a sophisticated web game. | 93 artificial intelligence module that powers a sophisticated web game. |
100 Native Client also enables applications to run unchanged across | 94 Native Client also enables applications to run unchanged across |
101 many platforms. | 95 many platforms. |
102 * **Any application that requires acceleration**: Native Client fits seamlessly | 96 * **Any application that requires acceleration**: Native Client fits seamlessly |
103 into web applications---it's up to you to decide to what extent to use it. | 97 into web applications---it's up to you to decide to what extent to use it. |
104 Use of Native Client covers the full spectrum from complete applications to | 98 Use of Native Client covers the full spectrum from complete applications to |
105 small optimized routines that accelerate vital parts of web apps. | 99 small optimized routines that accelerate vital parts of web applications. |
106 | 100 |
107 .. _link_how_nacl_works: | 101 .. _link_how_nacl_works: |
108 | 102 |
109 How Native Client works | 103 How Native Client works |
110 ======================= | 104 ======================= |
111 | 105 |
112 Native Client is an umbrella name for a set of interrelated software components | 106 Native Client is an umbrella name for a set of related software components that |
113 that work together to provide a way to develop C/C++ applications and run them | 107 provide a way to develop C/C++ applications and run them securely on the web. |
114 securely on the web. | |
115 | 108 |
116 At a high level, Native Client consists of: | 109 At a high level, Native Client consists of: |
117 | 110 |
118 * **Toolchains**: collections of development tools (compilers, linkers, etc.) | 111 * **Toolchains**: Collections of development tools (compilers, linkers, etc.) |
119 that transform C/C++ code to Native Client modules. | 112 that transform C/C++ code to Native Client modules. |
120 * **Runtime components**: components embedded in the browser or other | 113 * **Runtime components**: components embedded in the browser or other |
121 host platforms that allow execution of Native Client modules | 114 host platforms that allow execution of Native Client modules |
122 securely and efficiently. | 115 securely and efficiently. |
123 | 116 |
124 The following diagram shows how these components interact: | 117 The following diagram shows how these components interact: |
125 | 118 |
126 .. image:: /images/nacl-pnacl-component-diagram.png | 119 .. image:: /images/nacl-pnacl-component-diagram.png |
127 | 120 |
128 The left side of the diagram shows how to use Portable Native Client | 121 The left side of the diagram shows how to use Portable Native Client |
129 (PNaCl, pronounced "pinnacle"). Developers use the PNaCl toolchain | 122 (PNaCl, pronounced "pinnacle"). Developers use the PNaCl toolchain |
130 to produce a single, portable (**pexe**) module. At runtime, a translator | 123 to produce a single, portable (**pexe**) module. At runtime, a translator |
131 built into the browser translates the pexe into native code for the | 124 built into the browser translates the pexe into native code for the |
132 relevant client architecture. | 125 relevant client architecture. Translation occurs before any code is executed. |
133 | 126 |
134 The right side of the diagram shows how to use traditional (non-portable) | 127 The right side of the diagram shows how to use (non-portable) Native Client. |
135 Native Client. Developers use a nacl-gcc based toolchain to produce multiple | 128 Developers use a nacl-gcc based toolchain to produce multiple |
136 architecture-dependent (**nexe**) modules, which are packaged into an | 129 architecture-dependent (**nexe**) modules, which are packaged into an |
137 application. At runtime, the browser decides which nexe to load based | 130 application. At runtime, the browser decides which nexe to load based |
138 on the architecture of the client machine. | 131 on the architecture of the client machine. |
139 | 132 |
140 Security | 133 Security |
141 -------- | 134 -------- |
142 | 135 |
143 Since Native Client permits the execution of native code on client machines, | 136 Since Native Client permits the execution of native code on client machines, |
144 special security measures have to be implemented: | 137 special security measures have to be implemented: |
145 | 138 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 Pepper APIs to help developers make adjustments to API changes and take | 256 Pepper APIs to help developers make adjustments to API changes and take |
264 advantage of new features: `stable </native-client/pepper_stable>`_, `beta | 257 advantage of new features: `stable </native-client/pepper_stable>`_, `beta |
265 </native-client/pepper_beta>`_ and `dev </native-client/pepper_dev>`_. | 258 </native-client/pepper_beta>`_ and `dev </native-client/pepper_dev>`_. |
266 | 259 |
267 Where to start | 260 Where to start |
268 ============== | 261 ============== |
269 | 262 |
270 The :doc:`Quick Start <quick-start>` document provides links to downloads and | 263 The :doc:`Quick Start <quick-start>` document provides links to downloads and |
271 documentation that should help you get started with developing and distributing | 264 documentation that should help you get started with developing and distributing |
272 Native Client applications. | 265 Native Client applications. |
OLD | NEW |