YanmaJS is a JavaScript engine implemented in pure Zig. It is designed primarily for embedding into Zig applications, and also ships a CLI, a C ABI, and a WebAssembly build.
https://heriet.github.io/yanmajs/
Try it in your browser (sandbox)
- Most of this project was built with AI
- This is a personal learning and experimentation project — expect breaking changes. Not recommended for production use
- Embeddable — a small
ContextAPI for evaluating JavaScript from Zig, with host functions, modules, callbacks, and userdata - ECMAScript 2026-generation language support — test262 conformance 100% (48,419 passed, 0 failed, 117 non-goal tests skipped, of 48,536)
- NaN-boxed values — compact
u64value representation - Garbage collection — automatic memory management with configurable modes and limits
- Promise / async-await — with hooks to drive the host event loop
- ES Modules —
import/exportwith a pluggable module loader - Sandboxed execution — memory limits and execution interrupts for running untrusted code
- C ABI — a shared library and C header for embedding from C/C++ and other FFI-capable languages
- WebAssembly build — run the engine itself in the browser
- And more...
YanmaJS is licensed under the BSD Zero Clause License — see LICENSE. Generated tables derived from the Unicode Character Database are covered by the Unicode license — see THIRD_PARTY_LICENSES.