A preview-stage JavaScript-to-native compiler that translates JavaScript code into standalone native executables.
jsbin is a preview compiler for a substantial ES subset with partial ESM support and a limited Node core shim subset. It is not yet fully self-bootstrapping.
- Modern JavaScript syntax: arrow functions, async/await, promises, classes, modules
- ESM import/export flows (validated via in-repo fixtures)
- Node-style builtins:
console,process,fs(partial),path,timers,os - Native executable output for supported programs
- Full ECMAScript support
- Full Node.js compatibility
- Self-bootstrapping (cannot compile itself yet)
# Compile a JavaScript file
node cli.js examples/helloworld.js
# Run test fixtures
npm run test:fixturesjsbin/
├── cli.js # Compiler CLI entry point
├── compiler/ # JavaScript → IR → assembly compiler
├── runtime/ # Runtime shims (console, fs, process, etc.)
│ └── node/ # Node-style API implementations
├── asm/ # ARM64 and x64 instruction encoding
├── backend/ # Binary emission (ELF/Mach-O/PE)
├── lang/ # Lexer, parser, AST
└── tests/
└── fixtures/ # Test cases for ES, modules, Node subsets
- "preview" / "experimental"
- "supports a substantial ES subset"
- "includes a limited Node core shim subset"
- "validated primarily through repository fixtures"
- "full ES support"
- "full Node support"
- "drop-in Node replacement"
- "production-ready"
- "self-hosting" or "fully self-bootstrapping"