I've been working on this for awhile off and on, not to bury the lead: wrench is an interpreter that can run on anything down to an Uno Mini: the vm is <28k, runs on <1k of RAM, has ultra-small bytecode and is heavily optimized.
Of course it runs on anything else too, not that it's very useful on PC-class systems but it runs great on esp32 and samd21 for me.
Why? Well there are lots of use-cases for executing byte-code, in my case I needed field-scripting available to users of a lighting system, and parameters just wasn't going to cut it, they had to be able to script.
So it had to:
- Fit inside a small embedded system
- Run fast enough
- Be understandable to non-professional coders (FORTH was out
- Have a very fast iteration time.. even if I thought it was a good idea to have the users install an entire dev-stack to do field-programming (yuck) even modest re-compile/reflash is time is too much, it has to be push-button-poof-change like you are adjusting a slider bar to be acceptable.
Anyways I couldn't find anything that quite did what I needed so I made wrench, which has worked well.
I hope it can work for you too! It's all open, have at it, I want more programmers to hack on it to help me find issues and request features. Eventually I'll library-it I guess but for two source files? bah.
https://www.workshopfriends.com/wrench/www/
project here: GitHub - jingoro2112/wrench: practical embedded script interpreter
Comments other then "idiot re-inventing the wheel?" are more than welcome! Bugs even more so!