Feature: Support Rust via WASM
Type of feature
✨ Feature
Current behavior
No response
Suggested feature
I propose adding Rust support to LiveCodes by interpreting/compiling it into WebAssembly that browsers can understand. Adding Rust to LiveCodes will be a great addition, to be including one of the most popular programming languages that people are eager to learn/try. While being loyal/committed to LiveCodes' philosophy on evaluating all languages on the browser (client-side) with no backend (server-side)
I would like to work on implementing this feature, as i really need it personally. I'll follow the project's contribution guidelines and try my best!
Additional context
References that i'd look up into
- Rust and WebAssembly documentation
- Running rustc in a browser discussion on Reddit
- wasm-pack
- wasm-bindgen
There are some similar projects that had done that
-
Rubri
- actually, i think they managed to implement this tool out of that discussion on miri 's repo
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributing Docs
- [x] I agree to follow this project's Contribution Docs
.take
Hey @fahdfady That would be a great addition to LiveCodes. Please go ahead.
We can start by working on a demo that compiles rust code (as a string) to wasm in a simple html page outside LiveCodes.
Then we can adapt that demo to add the new language to LiveCodes. Other languages that work by compiling to wasm include WebAssembly Text and AssemblyScript. We can use the same way to send the generated wasm to the result page and run it.
Also you may find this guide helpful.
Just start by working on the demo and then I can guide implementing the rest.
Thank you very much indeed.
You may also want to check this: https://x0k.online/ppp/ https://github.com/x0k/ppp
We may also use it for: C#, Java, Go (wasm)