Listing of JavaScript engines for embedded systems/IoT applications

JavaScript could be an awful language (i.e. “typeof null returning ‘object’ is a bug that can’t be fixed, because it would break existing code”), but it is everywhere and is one programming language of IoT (other is Lua).

I decided to list here some small JavaScript options for embedded system:

Duktape ( – A small footprint, easily embeddable Ecmascript E5/E5.1 engine.

Espruino ( – A very small footprint interpreter specifically for microcontrollers. Can run in less than 8 kB of RAM by executing from source (rather than bytecode).

JerryScript ( – A very small interpreter developed by Samsung for IoT application.

MuJS ( – A lightweight ECMAScript interpreter library, designed for embedding in other software to extend them with scripting capabilities. Originally developed for MuPDF.

Throwback ( – The smallest JS engine for microcontroller, still in early stage of development

Tiny-JS ( A minimalJavaScript interpreter written in C++.

So, we have at least 6 JS engine options to use with microcontrollers. From this listing I think JerryScript is a step ahead, but Throwback could to evolve and be a real alternative for deep embedded systems.


Using VirtualBox with 1366×768 resolution

Sometimes you are forced to use Windows just for some seconds to get the work done. Fortunately MS was kind enough to release a Trial Windows image that you can run legally for 90 days as explained here (in Portuguese) :

But my laptop is old and its resolution is only 1366×768 and this resolution doesn’t appear as an option in the emulated Windows on VirtualBox. Even in the advanced options this resolution is not present.

After some search in the Internet I discovered how to create new resolutions option on VirtualBox:

$ VBoxManage setextradata "IE9 - Win7" CustomVideoMode1 1366x768x32


How to remove trailing whitespaces and new blank line at EOF from patches

When applying a patch in the git (i.e. using “git am” command) you could to face these warning messages:

Applying: You patch name
.git/rebase-apply/patch:9360: trailing whitespace.
 *    notice, this list of conditions and the following disclaimer. 
.git/rebase-apply/patch:2456: new blank line at EOF.
.git/rebase-apply/patch:3382: new blank line at EOF.
.git/rebase-apply/patch:4323: new blank line at EOF.
.git/rebase-apply/patch:4905: new blank line at EOF.

It will be very boring to discover what are these files and fix each one.
Fortunately you can use git itself to fix it for you:

$ git apply --reject --whitespace=fix filename.patch

If you want you can use “git add” and “git commit” to create a new patch without these “trailing whitespaces” and “new blank lines”.

UPDATE: You can use “git am –reject –whitespace=fix filename.patch” then it will fix the blank lines and trailing whitespaces and you don’t need to run “git add” and “git commit”!

I found the solution here: