Google Details PNaCl Native Client LLVM Bitcode
phoronix.com
phoronix.com
"Google has begun making public the details concerning their Portable Native Client (PNaCl) implementation."
To be completely fair, PNaCl is part of Chromium, and hence an open source project from the start. The code is freely available for anyone to see, check out and build, and has always been.
"Portable Native Client comes down to compiling Google Native Client applications to a subset of LLVM bitcode that can then basically run anywhere that Native Client is supported. "
I suppose Michael Larabel meant to say "compiling C and C++ applications" instead of "Google Native Client applications" here.
I think the most important thing here is not the code, but rather the refinements to LLVM IR bitcode to make it more portable. Most of LLVM IR is already CPU/platform agnostic but parts of it are closely tied to the target architecture (which makes sense since LLVM IR was originally targeted at compilers).
A standard portable subset of LLVM IR would be very welcome.
Chrome is positioning itself very, very strongly as a platform, not just a browser, and this is a necessary part of that. I'm not a fan of this ever-widening set of things browsers have to do (separate from each other / external libs / etc) since it just raises the bar for any competitors, but I must admit it is nicer for the user than all the past attempts.
That makes no sense, because the browser is by definition a platform.
This is terrible and I wish they'd stop doing this and stick to working with Mozilla more.
NaCL does permit web apps, the Pepper API allows calling browser APIs just like JS, unlike Flash.
The way I look at the browser is, it's a layout engine that manages a Render Tree built by DOM and CSS. It has external bindings for APIs to manipulate DOM, CSS, plus canvas, audio, storage, et al. These APIs may be called from JS, Dart, NaCl. It's the APIs that define the platform, not the programming language.
Too many people are fixated on JS. Really, all that truly matters is having a portable, secure mechanism for distributing code that can call into these bindings. Right now, JS is the only game in town, but there's no reason that has to be the dominant mechanism for the next decades.
If the Web is to be around for another 20-30 years, it needs to avoid stagnation via language zealotry.
http://www.chromium.org/nativeclient/how-tos/simple-rpc
Yes, there is some overhead involved in shipping bytes back and forth to another process, but there has been a good amount of work put into the process to making it so (p)nacl isn't in its own box in the corner, and you can have calls thrown back and forth as needed.
Things like this mean that you don't have to reinvent wheels just because you want to push processing to the client side. There's a considerable amount of c/c++/everything else code out there, and it is rather pointless to have to maintain two codebases just so you can have something web-enabled.
It may be yet another rectangle in a browser but there are unquestionable advantages in native code versus JavaScript or Flash (but comes with its own problems too). As such, NaCl is a worthwhile effort even if it never catches on big time and remains a Google research project.
NaCl can actually interoperate with the DOM and JS quite well - there are examples in the SDK. It is not aimed solely at "disconnected rectangle"-like applications.
As secure as possible.
As portable as possible.
It's definitely an interesting feature set. I personally hope ASM.JS is able to "catch up" to NaCl, but if it doesn't, then I hope PNaCl becomes widely available.