llvm-wasm
llvm-wasm copied to clipboard
Same approach but for rust in browser
I was wondering, do you think this approach can be used to run rust in the browser? if so, how would you go about it?
btw, awesome project!
Thanks!
To run Rust tooling (rustc, cargo, etc.) on the browser, I believe you'd need to compile them to wasm32-emscripten, and the compiled rustc needs to support the wasm32-wasi target. They basically play the role of clang -cc1 or llc in the README.
Looking at https://doc.rust-lang.org/nightly/rustc/platform-support.html, rustc does support compiling to wasm32-wasi which is good, but wasm32-emscripten is only at Tier 2 support w/o host tools, so you'd need to experiment a bit to get it to compile to wasm32-emscripten.
Would love to see rustc running in the browser though!