livecodes icon indicating copy to clipboard operation
livecodes copied to clipboard

Feature: Support Rust via WASM

Open fahdfady opened this issue 1 year ago • 3 comments

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

There are some similar projects that had done that

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

fahdfady avatar Feb 06 '25 06:02 fahdfady

.take

fahdfady avatar Feb 06 '25 06:02 fahdfady

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.

hatemhosny avatar Feb 06 '25 09:02 hatemhosny

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)

hatemhosny avatar Feb 06 '25 14:02 hatemhosny