Define: Native Client is an open-source technology for running native compiled code in the browser.
The goal: Maintaining the OS portability and safety that people expect from web apps.
History: Google has implemented the open-source Native Client project in the Chrome browser on Windows, Mac, and Linux. The Native Client Software Development Kit (SDK), itself an open-source project, lets developers create web applications that use Native Client and run in Chrome across OS platforms. In addition to software libraries, the SDK includes a toolchain tailored to generate executable Native Client code, as well as a variety of code examples and documentation.
Benefit: Native Client enables you to extend web apps running in the browser with custom features and proprietary code.
- Existing software components: With its native language support (currently C and C++), Native Client enables you to reuse current software modules in a web app—you don’t need to spend time reinventing and debugging code that’s already proven to work well.
- Legacy desktop applications: Native Client provides a smooth migration path from desktop application to web app. You can port and recompile existing code for the computation engine of your application directly to Native Client, and need repurpose only the user interface and event handling portions to the new browser platform.
- Enterprise applications that require heavy computation: Native Client handles the number crunching required by large-scale enterprise apps. To ensure protection of user data, Native Client enables you to build complex cryptographic algorithms directly into the browser so that unencrypted data never goes out over the network.
- Multimedia apps: Codecs for processing sounds, images, and movies can be added to the browser in a Native Client web app.
- Games: Native Client enables a web app to run close to native speed, reusing existing multithreaded/multicore C/C++ code bases, combined with low-level access to low-latency audio and (coming soon) networking APIs and OpenGL ES with programmable shaders.
- No support for hardware exceptions
- No support for process creation / subprocesses
- No support for raw TCP/UDP sockets (analogus versions—websockets for TCP and peer connect for UDP—are in the works and will be available soon)
- No support for synchronous (blocking) I/O
- No support for query to available memory inline assembly must be compatible with the Native Client validator (you can use the ncval utility in the SDK to check)
- Pepper API calls (described below) must come from the main thread