Alternative to PNaCl which can run LLVM Module within broswer

95 views
Skip to first unread message

Miroslav Kravec

unread,
Jun 3, 2017, 9:43:11 AM6/3/17
to Native-Client-Discuss
Hello,

I had plans to use PNaCl in my projects under development: language+tools+app. The prototype already generates output as runnable LLVM Module. The PNaCl would have offered efficient way to run complex generation  datacode from within a browser. With some (or a lot of) modifications, the project could have been integrated with PPAPI and run seamlessly from within a browser.

Is there alternative to run LLVM Module from browser efficiently?

Kind regards,

Floh

unread,
Jun 5, 2017, 8:18:19 AM6/5/17
to Native-Client-Discuss
You can try to hook into the emscripten toolchain, this uses a custom LLVM backend called 'fastcomp', which at one point was derived or merged from the PNaCl LLVM backend. If your generated LLVM bytecode is compatible with what fastcomp generates, emscripten should be able to generate asm.js or WebAssembly from this.

There's also an 'official' WebAssembly backend for LLVM in the works, but I don't know how usable that is.

Rust also has a working asm.js/wasm backend for a while now, may be you can steal some ideas from there.

You could also ask around on the emscripten discussion list: https://groups.google.com/forum/#!forum/emscripten-discuss

Cheers,
-Floh.

Miroslav Kravec

unread,
Jun 6, 2017, 2:28:01 PM6/6/17
to Native-Client-Discuss
Thanks. It seems as a viable alternative. However, I still like the idea to directly use of LLVM Module with PNaCl much more than asm.js/WebAssembly.

Dňa pondelok, 5. júna 2017 14:18:19 UTC+2 Floh napísal(-a):
Reply all
Reply to author
Forward
Message has been deleted
0 new messages