Developing a Lua VM in JavaScript
skillsmatter.com
skillsmatter.com
Layer 2 - C to schedule tasks, manage memory, provide filesystem support.
Layer 3 - C/C++ to provide a graphical user interface framework.
Layer 4 - C/C++ to render web pages.
Layer 6 - C/C++ to implement a Javascript VM.
Layer 7 - Javascript to implement a Lua interpreter.
Layer 8 - Game engine written in Lua.
Layer 9 - Game specific code written in Lua.
I wonder how much bang per Mhz this setup provides.
Also, there is no reason Lua in JS could not run at similar speed to JS, if the translation from Lua to JS is efficient enough. Whether that is possible depends on how close Lua and JS semantics are. That could also be at least partially achieved by using a Lua VM that has a JIT, and implementing a JIT backend that emits JS. Such an approach could be quite fast.
https://github.com/mherkender/lua.js
Or is this more of an educational than practical workshop?