pnacl

268 views
Skip to first unread message

Ged Wed

unread,
Nov 30, 2014, 10:50:12 AM11/30/14
to juli...@googlegroups.com
I was wondering how interested the group is in PNACL. 

The idea is that with Julia and LLVM, its possible to compile to PNACL.
Why is it useful ?
Well it will vary for different projects of course. For me, we want to expose it to Google chrome.
Python group has gotten it working and basically have ipython running in the browser with plots.
Go can now do it
Rust can also do it.

This is the cool aspect of LLVM, compared to JVM. 
JVM was write one, run everywhere.
LLVM is more like write anyway, deploy everywhere.

Also i noticed that with Julia, because it is doing JIT with LLVM, its possible to link to c code directly.
So this means that its vary possible to use Julia as a combining language for c, and GO, and output to PNACL.

Thats a pretty useful i feel.

Wondering how people feel about this though ?

Stefan Karpinski

unread,
Nov 30, 2014, 10:55:29 AM11/30/14
to Julia Dev
This would be very cool. The main question is how good is the PNaCl support for JIT?

Ged Wed

unread,
Nov 30, 2014, 10:57:59 AM11/30/14
to juli...@googlegroups.com
Does it have to support JIT neccessarily.

A Julia library can be written and latter be cross compiled to PNACL later ?
PNACL is very much an AOT environment.

Mike Innes

unread,
Nov 30, 2014, 11:07:38 AM11/30/14
to juli...@googlegroups.com
Personally I'd rather see great Emscripten support – asm.js looks to be gaining traction as a way of achieving the same things as PNaCl without plugins.

Plus, guess what works over Emscripten that would let us JIT code in the browser. Porting all of Julia's runtime certainly wouldn't be trivial but it is possible.

I thought there was some activity on this on the mailing list a while back, but I don't know if it went anywhere.

Ged Wed

unread,
Nov 30, 2014, 11:16:13 AM11/30/14
to juli...@googlegroups.com
I agree that  ASM.js is valuable.

PNACL is good for certain situation, and ASM for others. What and where is a huge debate i would rather avoid :) LOts of heat and opinions in this area.

The good thing is though that is possible to have both - the  Native Client (PNACL) SDK can produce both as it is now. Also google have a patch apparently going into LLVM which will make it tighter going forward.

Stefan Karpinski

unread,
Nov 30, 2014, 12:16:50 PM11/30/14
to Julia Dev
Do you know what the status of JIT support in PNaCl is?

Andreas Lobinger

unread,
Dec 1, 2014, 4:18:27 AM12/1/14
to juli...@googlegroups.com
Hello colleague,


On Sunday, November 30, 2014 6:16:50 PM UTC+1, Stefan Karpinski wrote:
Do you know what the status of JIT support in PNaCl is?

Vanishing to None?
Afaics the mainstream of PNaCl is a loader and an execution unit (sandbox) for compiled code. And this may be the differentiator -> PNaCl for static executables, JS/Emscripten for JIT.

Ged Wed

unread,
Dec 1, 2014, 11:50:08 AM12/1/14
to juli...@googlegroups.com
Just-In-Time code generation is supported by NaCl, but is not currently supported by PNaCl. It is currently not possible to mark code as executable.

Nacl is perfectly fine for developer time. When your done you can then finalize the code to a pnacl.

More info here:
https://developer.chrome.com/native-client/reference/pnacl-undefined-behavior

Stefan Karpinski

unread,
Dec 1, 2014, 11:52:26 AM12/1/14
to Julia Dev
On Mon, Dec 1, 2014 at 11:50 AM, Ged Wed <ged...@gmail.com> wrote:

Nacl is perfectly fine for developer time. When your done you can then finalize the code to a pnacl.

Julia JITs code, so that's not really the case – we need JIT support to work normally. 

Ged Wed

unread,
Dec 1, 2014, 12:13:30 PM12/1/14
to juli...@googlegroups.com
Can you explain in more detail. Am curious why the back jit is not enough ?

Stefan Karpinski

unread,
Dec 1, 2014, 12:19:38 PM12/1/14
to juli...@googlegroups.com
Julia code is jitted; if you want to run Julia in the browser, the browser needs to be able to JIT code. PNaCl does not support that. I'm not sure how else to explain it. What is "back jit"? I'm not familiar with that term.
Reply all
Reply to author
Forward
0 new messages