4 ms·
> I've gotten so tired of recompiling and waiting to flash a chip with C, that I've started learning ANTLR and making my own language. The idea is to have a lan
by CharlesW 7y ago
> I've gotten so tired of recompiling and waiting to flash a chip with C, that I've started learning ANTLR and making my own language. The idea is to have a language which runs in a VM written in C, and allows you to easily access code which has to be in C.
You may want to check out Moddable's XS runtime[1], which is exactly that. It's written in portable C, and "XS in C"[2] makes it easy to interoperate with C code you may write. And even if you decide to roll your own runtime, there's tons to learn from the source code.
[1] https://www.moddable.com/faq.php#what-is-xs https://www.moddable.com/faq.php#what-is-xs
[2] https://github.com/Moddable-OpenSource/moddable/blob/public/documentation/xs/XS%20in%20C.md https://github.com/Moddable-OpenSource/moddable/blob/public/...
- caseymarquis 7y agoI will definitely check that out. Thanks! I haven't gotten to building the VM yet, and I'm hoping to just use someone else's and then contribute the tools I need to their ecosystem.