6 ms·
Emscriptem is targeted at browsers and for that rust does have the target wasm32-unknown-emscripten However, when targeting wasm outside browsers wasm32-wasi i
by pacificat0r 5y ago
Emscriptem is targeted at browsers and for that rust does have the target wasm32-unknown-emscripten
However, when targeting wasm outside browsers wasm32-wasi is usually a better option.
- gk1256 5y ago"Emscripten" can target platform outside browsers. You have STANDALONE_WASM flag for that.
- jedisct1 5y agoWhen targeting WASI or for standalone (no wasi, no emscripten) WebAssembly, Zig is currently the best option, IMHO. Modules are small and fast, virtually all existing code is compatible out of the box and the standard library comes with full WASI support. And enabling runtime-specific optimizations such as SIMD is as simple as adding a compilation target flag. While I maintain quite a few Rust crates specifically designed for WebAssembly/WASI usage, my personal experience is that Zig is often better, even from a performance perspective. TinyGo is also amazing at producing optimized modules, and a lot of existing Go code can be compiled with it without any changes.
- pjmlp 5y agoI already have wasm outside browsers, it is called JVM and CLR bytecode. > More than 20 programming tools vendors offer some 26 programming languages — including C++, Perl, Python, Java, COBOL, RPG and Haskell — on .NET. https://news.microsoft.com/2001/10/22/massive-industry-and-developer-support-for-microsoft-net-on-display-at-professional-developers-conference-2001/ https://news.microsoft.com/2001/10/22/massive-industry-and-d...