Hacker News new | ask | show | jobs
by TazeTSchnitzel 4058 days ago
There's a very big difference. NaCl and PNaCl don't use the standard, multi-vendor web APIs. They use a proprietary single-vendor (Google) API, Pepper. This not only makes implementation by competitors difficult, it's needless duplication of effort (why maintain multiple APIs for the same thing?).

Also, both are based on single-vendor, single-implementation technology. NaCl used actual native code, so if you're not using x86-64 or ARM, too bad! And PNaCl uses LLVM, so there's only one implementation.

Compare this to asm.js. It's a strict subset of ECMAScript/JavaScript, which has several high-quality implementations, and is portable across platforms. It uses the existing standard web APIs, which also have several high-quality implementations.

2 comments

Sure, but under the hood both the HTML5 APIs and Pepper APIs call into the same code, at least for WebGL, the performance behaviour on Chrome between WebGL and Pepper's GL wrapper is basically identical, and most other exposed API features are so similar to their HTML5 counterparts that it is almost certain that there's the same code underneath.
> Sure, but under the hood both the HTML5 APIs and Pepper APIs call into the same code

It's still wasted effort, though. Maybe they share some code, but Pepper is an unnecessary extra API. One that's non-standard and results in vendor lock-in.

Do you think Google could be persuaded to contribute PNaCL as an open standard?
There were beginnings of talks to get cross-vendor consensus on Pepper (which would be a prerequisite to any standardization attempt of PNaCl) in 2010: https://mail.mozilla.org/pipermail/plugin-futures/2010-April...

The general consensus among non-Google browser vendors was that just using the existing browser APIs was a more desirable approach than Pepper. Since then, Pepper has remained a Chrome-specific technology.

Could Google add NaCl support to Firefox with an add-on?
They could, but why would they?
Judging from their FAQ [0] on it, it doesn't seem like they are generally opposed to the idea, just see it as premature at this time.

[0] https://developer.chrome.com/native-client/faq

Pepper is not proprietary, it's completely open source.
That doesn't make it not proprietary! It's open-source, sure, but it's not something easy for other browser vendors to implement and only has a single implementation.
Being open source doesn't help other people to adopt the code if it has hard dependencies on other parts of Chrome.