2 ms·
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 ha
by gpm 5y ago
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.