4 ms·
> I see Rust as the big next step for the web—a language that is still a pleasure to develop in, but with excellent static typing and tight, targeted builds wit
by grayrest 10y ago
> I see Rust as the big next step for the web—a language that is still a pleasure to develop in, but with excellent static typing and tight, targeted builds without the bloat and buildup I'm accustomed to seeing with current transpile-to-JS strategies.
I think this will depend on the output size of the compiled file. I've always gotten very large js files out of emscripten, which are fine for games or media decoders, but would be undesirable for (e.g.) a vdom implementation that's part of a larger framework.
- mrec 10y agoAgreed. I'm moderately optimistic though - statically-linked Rust binaries have always tended to be on the chunky side, but AIUI a lot of that footprint is jemalloc, which I'd hope wouldn't be included in an Emscripten build.
- brson 10y agoBoth Rust and emscripten do produce notably large output. On the Rust side it's true that the emscripten port won't use jemalloc, but instead the emscripten malloc (which presumably is better tuned for its environment). Also the wasm format's main design goal is to reduce binary size.
- slimsag 10y agoWebAssembly will have a binary format with a 20-30% reduction size than its gzipped asm.js counterpart[1], for context :) [1] https://github.com/WebAssembly/design/blob/master/Rationale.md#why-a-binary-encoding https://github.com/WebAssembly/design/blob/master/Rationale....