as you're working in JS you could look at compiling Espruino with Emscripten
A while ago I played with that idea for a bit. Got to the point where I got the minimum running within node.js but for more it would require some clever work on implementing the JS<->C trampoline properly.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
A while ago I played with that idea for a bit. Got to the point where I got the minimum running within node.js but for more it would require some clever work on implementing the JS<->C trampoline properly.