Have you heard about the small JS engine for embedded devices?

https://github.com/bellard/mquickjs

Previous