JavaScript for embedded C++ — small, direct, predictable

Emjs is a lightweight JavaScript interpreter designed for firmware, tooling, and resource-constrained environments. It interprets source directly (no bytecode VM) and runs inside a fixed memory buffer you control.

C++17 Direct interpretation Fixed memory Closures & arrow functions Static libraries

Why Emjs?

Emjs targets scenarios where V8 or QuickJS would be too heavy, but you still want real JavaScript logic inside a C++ application.

Embedded-first design

Run in a caller-provided buffer or a single malloc block. GC threshold and C-stack limits are configurable.

Simple integration

Two static libraries (emjs-core, emjs-exts), a clean JsEngine API, and optional native function binding.

Node-like CLI

The emjs executable runs scripts, supports REPL mode, and ships with common extensions enabled at build time.

Modern JS subset

let/const, arrow functions, closures, array methods, try/catch, and more — documented against source code.