2 ms·
I can't think of any good use cases for loading WebAssembly modules into native code. I also think it's bad out of the gates that the WebAssembly community is s
by MuffinFlavored 7y ago
I can't think of any good use cases for loading WebAssembly modules into native code. I also think it's bad out of the gates that the WebAssembly community is so fragmented across the different runtimes (each offering different functionality at the moment).
- flohofwoe 7y agoThink of plugins for applications like Autodesk Maya. Currently these are either cross-platform, but very slow Python plugins, or fast native DLLs which need to be compiled for each app-version/OS/CPU combination. If Maya had an embedded WASM runtime it could support plugins which are fast (at least much closer to native speed than Python scripts), and you only need to distribute a single WASM blob.
- MuffinFlavored 7y agoWhy not just use Lua?
- flohofwoe 7y agoSometimes you need to embed libraries which are only available as C or C++, or other programming languages. If this code needs to be included into the Lua plugin as CPU/OS specific DLLs you're back at the current mess.
- cpeterso 7y agoFastly is building a WebAssembly runtime on its edge servers so customers can run their own sandboxed WebAssembly closer to clients: https://www.fastly.com/blog/announcing-lucet-fastly-native-webassembly-compiler-runtime https://www.fastly.com/blog/announcing-lucet-fastly-native-w...
- MuffinFlavored 7y agoWasmer Lucet wasm-jit-prototype None of them will let your WebAssembly code call an exported function from a shared library. As an exercise, try to call https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messagebox https://docs.microsoft.com/en-us/windows/win32/api/winuser/n... from WebAssembly.