mercredi 20 mai 2020

Is there a way to run C program locally in a browser?

Yes, there is a duplicate problem, but it was asked 5 years ago and haven't been updated for a long time.

In 2020, with the development of WebAssembly, is there a way to compile and run a simple C program locally in the browser?

There is a platform called WasmFiddle which can compile C to wasm in browser, but it lacks the support of standard libraries, such as stdio.h. I think we can implement standard librarys in js and maybe export it to wasm? But this requires lots of work.

My original goal is to build a web-based IDE for students to learn C programming without costing a lot on servers for remote running. So, only libraries like stdio.h, math.h, string.h are required.

High performance is not required, so wasm-based solutions and maybe a VM running c implemented in JS are both greate solutions.




Aucun commentaire:

Enregistrer un commentaire