V7: Embeddable JavaScript Engine

For a project of mine I was looking for an embedded scripting language. Lua was my first choice. But not many outside gaming know Lua much. Even though I thought about JavaScript, I ignored it for a long time considering it isn’t great for an embedding. Recently I while exploring embeded systems I came across multiple libraries like Ductape, cesanta/v7, JerryScript etc. Amongst these v7 caught my eye as it was the most simple one. It also powers mongoose-iot, an open source full-stack IoT solution. Mongoose-IoT works on very basic hardware platforms like ESP8266. Below I have a simple JavaScript code embedded inside a C code.
TIP: You can copy paste the code from the player below. Its animated an ASCII cinema and not a video.

As you can see its very simple get going. My use case has a web application where a logged in user can script a flow that will run on server side inside a sandbox (No FS or Memory access etc). I will write more, once I reach some stage on that front. On the other hand I am planning to run V7 on ESP8266. That’s exciting.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *