Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can chrome native client do anything that javascript cannot do?

I am confused about the utility of native client in Chrome other than say using the language of your choice and running faster.

Can one accomplish anything in native client that you cannot do in javascript? By anything, I mean functionality, not a better/faster way of doing the same thing. For example, javascript cannot open a UDP socket, but native client can.

like image 386
software engineer Avatar asked May 28 '14 05:05

software engineer


People also ask

What is the meaning of Native Client?

An application that was developed for the computer it is running in. For example, a Windows app runs only in a Windows environment, and a Mac app runs only in a Mac environment.

What is Native Client on Chrome flags?

Security: Native Client lets users run native compiled code in the browser with the same level of security and privacy as traditional web applications.

What is Chrome Native used for?

What is the Google Chrome Native Client? Native Client is an open-source technology that allows you to build web applications that seamlessly execute native compiled code inside the browser. This Google Code project is for maintaining the Native Client implementation, including compiler and browser support.

What is NaCl in Chrome?

Google Native Client (NaCl) is a sandboxing technology for running either a subset of Intel x86, ARM, or MIPS native code, or a portable executable, in a sandbox.


1 Answers

Your first line addresses two points where Native Client provides utility. NaCl is good for C/C++/assembly coders to bring an application written in their language of choice to the web, and NaCl helps applications run faster/with better performance/more efficiently (aka with less use of battery). Native Client also provides threaded applications, allowing programming models (and the performance that goes along with threads) to run natively on the web (aka not with web workers).

The Sockets API is available to all chrome packaged apps, the distinction is that the API makes the sockets directly to a NaCl application, which is faster and has the benefit of porting existing native applications to the browser without modifications. There are also a variety of other APIs, like Game controllers, hardware decode (coming soon), and Fullscreen/Mouselock. Find the full list of Pepper APIs that enable NaCl capabilities here: https://developer.chrome.com/native-client/pepper_stable/c/index#pepper-stable-c-index.

For Portable Native Client, the most notable capabilities are the ability to use threading, and portable intrinsics (SIMD). Perhaps writing core logic that can run cross-platform (aka a C/C++ "model" that can interact with different views on different platforms) isn't a strict capability, but it is a benefit of using NaCl, especially for developers also using Objective C/Android NDK to build native mobile versions of their application.

like image 180
NaClPM Avatar answered Oct 21 '22 08:10

NaClPM