5 ms·
What is the significance of creating a domain specific language for WASM? Doesn’t using something like Rust work well enough? (Genuinely curious)
by linux2647 7y ago
What is the significance of creating a domain specific language for WASM? Doesn’t using something like Rust work well enough? (Genuinely curious)
- est31 7y agoI don't know why the author created Psyche, but WASM is mostly made for being sent over the wire e.g. when you visit a web site. For this, small binaries are usually very helpful because it speeds up JIT and download. Rust on the other hand wasn't really made for creating small binaries. This is because of the language encouraging non-erased generics aka monomorphization as well as associated bloat bugs like [1]. Maybe one day the bloat bug is fixed and someone can create a lint to warn against generics and we'll get monomorphization-free iterator libraries, but until then Rust isn't perfect for wasm. [1]: https://github.com/rust-lang/rust/issues/46477 https://github.com/rust-lang/rust/issues/46477
- whatwgg 7y agoNim (higher level than C) creates small binaries and uses Emscripten to produce WASM.