Re:Bringing the web up to speed with WebAssembly
by jfbastien on Friday September 22, 2017 @12:42PM
(#15313712)
In theory, yes, but WebAssembly current has put little effort on standardizing packaging and ABIs. That work is in progress here: https://github.com/WebAssembly/tool-conventions but is still very early. You'd then need each of these platform exposing a standard set of imports to WebAssembly binaries because from the compiler's perspective WebAssembly looks like an OS with a virtual ISA, so these embedder imports are kind of like an OS' syscalls. That's a lot of work, isn't very advanced yet, but in theory is all possible and WebAssembly was explicitly designed to make it possible.
[ Parent
| on HN ]
Re:Bringing the web up to speed with WebAssembly
by slededit on Friday September 22, 2017 @03:52PM
(#15315219)
I'm actually working on an effort in this space. Specifically we're at the point where it's time to stand up a libc in a non web embedding.
If anyone is interested in the effort they should let me know.
Re:Bringing the web up to speed with WebAssembly
by jfbastien on Friday September 22, 2017 @04:16PM
(#15315406)
I'd honestly just start with musl libc. The one Emscripten supports mostly just imports the same syscalls as Linux, with some ugliness to be able to do some DCE. If you clean that up your embedder will only need to implement those syscalls.
Re:Bringing the web up to speed with WebAssembly
by slededit on Friday September 22, 2017 @05:27PM
(#15315966)
I am working with musl, however not the one with emscripten. That one is heavily modified farming out significant parts to the javascript runtime. It is a goal to provide a minimal surface area for embeddors and part of that is not requiring a JS runtime.
Re:Bringing the web up to speed with WebAssembly
by mwcampbell on Friday September 22, 2017 @11:16PM
(#15317877)
Please contact me privately. My email is in my profile. Thanks!