4 ms·
Interesting project. Have you considered making an REPL using WASM in browsers as a playground? I am developing this music live coding language and audio libra
by chaosprint 5y ago
Interesting project. Have you considered making an REPL using WASM in browsers as a playground?
I am developing this music live coding language and audio library with Rust and it runs in browsers:
https://glicol.org https://glicol.org
I am now using Rhai.rs as the embedding language to write `meta' node in the audio graph. But for audio programming, the running time for each block should not exceed 3ms. In some cases, I found Rhai quite struggling with that. Perhaps dynamic languages have an inherit limitation on that? Wondering how do you see this issue and will performance be part of the future consideration of sphinx-lang?
- harpiaharpyja 5y agoThat would be really cool. I don't know very much about WASM but this seems like a great excuse to learn.
- jiyinyiyong 5y agoRust really has a great support for WASM. I made a tiny language as well, and managed to build targeting WASM in a few steps https://github.com/calcit-lang/wasi-calcit/blob/main/.github/workflows/test.yaml#L29-L31 https://github.com/calcit-lang/wasi-calcit/blob/main/.github... . Tips to notice is WASM runs inside a sandbox, which means threads, random numbers generator(not sure for WASI), FFIs, etc. have to be moved out of the core to prevent them being compiled to WASM, which would probably fail. For major part of the code, they can be compiled to WASM and WASI(WASM System Interface) very easily.