4 ms·
Does anyone know why Rust is one of the "de facto" host languages for WebAssembly? Is it because Rust naturally leant itself to machine code, therefore it was
by alephnan 5y ago
Does anyone know why Rust is one of the "de facto" host languages for WebAssembly?
Is it because Rust naturally leant itself to machine code, therefore it was easier to build a compiler?
Is it because the Rust community wants to create more "killer features" for the language and have it stand out?
Are there benefits to using Rust versus TypeScript as the host language?
- nindalf 5y agoCan TypeScript be compiled to WebAssembly? My understanding was that it couldn’t be, although a related language AssemblyScript could be.
- biztos 5y agoI don’t know but I would guess it’s because of the relationship between Rust and Mozilla. https://news.ycombinator.com/item?id=26067118 https://news.ycombinator.com/item?id=26067118 There are probably specific advantages to Rust, but it’s also just nice to work in a language you like. I can compile Go to WebAssembly so I’m not going to write TypeScript. Your preferences may differ.
- amouat 5y agoOne of the major benefits of Rust is that it isn't garbage collected. I'm not sure of the current status of GC support in WASM, but it used to mean that to compile something like Go to WASM also meant including a full GC implementation in the WASM code, not only bloating it but complicating implementation etc.