Skip to content
Node.js-based JavaScript->C++ compiler
JavaScript C++ Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Espruino Compiler

See the Espruino Compilation Page

This project does the following:

  • Turns JavaScript code into C++ (that calls into Espruino library functions for more complicated operations)
  • Compiles the code with GCC
  • Links and Extracts a relocatable blob of Thumb code
  • Formats it into JS that can be run in Espruino


  • utils.js - general utilities
  • infer.js - Type inferral on parse tree
  • compile.js - Parse tree -> C++, and calling of GCC
  • server.js - server that performs compilation for the Web IDE
  • index.js - simple command-line test
  • test.js - test in such a way that the C code is compiled into Espruino - allowing nice easy GDB debug


You need:


  • Run node server.js
  • Go into Web IDE settings and set Communications / JavaScript Compiler URL to http://localhost:32766
You can’t perform that action at this time.