Closed danilopedraza closed 2 months ago
I found a nice exception: Io. It has a REPL compiled in WASM.
I'm going with the plan of compiling to WASM. However, this needs some preparation work.
core
into smaller cratesThis will allow me to only compile to WASM what I need, and to interact with the browser in a non-hacky way.
Splitting was not necessary. I used wasm-pack
to generate the necessary wasm
and it compiled only what was necessary.
I'm using wasm-bindgen
to generate all the glue code. Overall, this looks good.
The playground now (barely) works. I need to work in the interface, ergonomics and error reporting (crashes, overflow)
I just saw this tool, for the record.
Here are some requirements for the playground:
getln()
function
I need to make a playground, so it is easy to try the language.
I looked at the code of Dart, Go and Rust playgrounds, and all of them run with a backend where all the code runs.