Stream: general

Topic: Viable Interpreters


view this post on Zulip theduke (Sep 14 2021 at 09:28):

Are there any viable language interpreters that run well in WASM, especially with easy integration via Rust?

This is related to the recent Javascript efforts (https://bytecodealliance.zulipchat.com/#narrow/stream/206238-general/topic/Making.20JavaScript.20run.20fast.20on.20WebAssembly), but that doesn't seem to have resulted in anything reusable yet.

I got QuickJS to run , but it's a bit awkward to build and setup, especially from a Rust library, and QuickJS isn't as mature as I'd like and has bad error messages.
Same story for Duktape, which also doesn't support much of modern Javascript.

I also tried RustPython, but that currently fails to compile to valid wasm.

Any other suggestions for some runtimes? Maybe I'm missing something.

The only solution I've found for now that works effortlessly from Rust is https://github.com/gluon-lang/gluon, which compiles and runs just fine. But that's a rather fringe, inactive language, so also not ideal.

A static, type inferred and embeddable language written in Rust. - GitHub - gluon-lang/gluon: A static, type inferred and embeddable language written in Rust.

view this post on Zulip fitzgen (he/him) (Sep 14 2021 at 16:57):

I've never used it myself, but I know people have compiled the lua interpreter to wasm

view this post on Zulip theduke (Sep 14 2021 at 17:09):

Thanks for the hint, lua indeed compiles with emscripten without an issue!


Last updated: Nov 22 2024 at 16:03 UTC