3 ms·
ASIDE: Any suggestion for ways to generate programatically with Rust? https://www.reddit.com/r/rust/comments/nvxh12/for_building_a_languageinterpreter_wasmer_
by mamcx 5y ago
ASIDE:
Any suggestion for ways to generate programatically with Rust?
https://www.reddit.com/r/rust/comments/nvxh12/for_building_a_languageinterpreter_wasmer_or/ https://www.reddit.com/r/rust/comments/nvxh12/for_building_a...
- hardwaregeek 5y agoWalrus is great although because it was intended for editing existing WASM binaries and not being a WASM compiler backend, it has some limitations. For instance it can't easily generate recursive functions cause you need the function id before generating the function body and that's not easy in Walrus.
- gpm 5y agoFor what it's worth, I spent a bit of time setting up assemblyscript (basically typescript) compilation driven by a rust program (with the actual compilation happening in a js vm) not too long ago for an (unpublished) side project. If that's something you'd be interested in I could see about reviving it and refactoring it out, or you could probably do the same from scratch, but it is a bit janky, and it sounds like you really want a backend for a homegrown compiler not an entire compiler. I also think you might be able to use cranelift as the sort of backend you are looking for, but I haven't tried.