Re:Rust: Enable WebAssembly backend by default
by josephg on Sunday November 26, 2017 @04:28PM
(#15783096)
Thats much smaller than I expected, especially given how large rust native binaries usually are. What allocator does that use? Does that 65k include its own malloc implementation like we needed for asmjs, or does WASM expose a system malloc library or something?
[ Parent
| on HN ]
Re:Rust: Enable WebAssembly backend by default
by steveklabnik on Sunday November 26, 2017 @04:42PM
(#15783174)
wasm exposes "memory sections", which the module states up-front how much it wants. It can also generally call a "grow memory" function that makes this space bigger. That's it, from the direct wasm perspective.
That said, this target uses https://github.com/alexcrichton/dlmalloc-rs