News for hackers. Stuff that matters.
Re:Wasmer 2.0 by mamcx on Thursday June 17, 2021 @11:16AM (#27540503)
ASIDE:

Any suggestion for ways to generate programatically with Rust?

https://www.reddit.com/r/rust/comments/nvxh12/for_building_a...

Re:Wasmer 2.0 by hardwaregeek on Thursday June 17, 2021 @11:33AM (#27540721)
Walrus 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.
Re:Wasmer 2.0 by gpm on Thursday June 17, 2021 @12:38PM (#27541553)
For 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.