mortbopet / Ripes

A graphical processor simulator and assembly editor for the RISC-V ISA
https://ripes.me/
MIT License
2.49k stars 270 forks source link

WASM: how to include a C compiler? #309

Open mortbopet opened 11 months ago

mortbopet commented 11 months ago

For https://ripes.me/, using a C compiler diverges from what we do locally (where the user is expected to provide their own compiler binary).
Now, one could package a compiler binary into the WASM binary, but that would result in >100MBs worth of data having to be downloaded when users access the site - not an option.

Instead, we should look to e.g. how compiler explorer works (https://xania.org/201609/how-compiler-explorer-runs-on-amazon). We probably don't need the same kind of scale, so i'd think that a single instance running RISC-V binaries would be sufficient (would still require some thought as to how that server is financed).