Hacker News new | ask | show | jobs
by kbenson 3700 days ago
> This leads to the following situation where the main program and the worker both reference the same memory, which doesn’t belong to either of them:

If only Mozilla had some technology that could deal with ownership of memory...

Seriously, if rust doesn't have an ASM.js optimized target yet, it really should.

4 comments

I would be very surprised if Rust doesn't target WebAssembly sometime in the future. It's just such a good fit. If I remember correctly there are already talks about doing MIR->WASM.
We Rust folk have definitely got plans in this space. :)
If rust can be compiled to LLVM, then emscripten can be the backend to asm JS
The issue is emscripten uses a different LLVM version than we do; so it can work, but it's got some rough edges.

We want both compile to JS and compile to wasm to work well, the work just isn't done yet.