Language Overview
Pure compiles TypeScript and JavaScript to native machine code. It is not a wrapper around Node, Bun, or any other JavaScript engine. The output is a standalone binary that runs your program directly.
Mental model
Section titled “Mental model”Think of Pure the same way you think of a Go or Rust compiler: you write source code, run a compiler, get a binary. That binary embeds the logic of your program. It does not bundle a JavaScript runtime.
This has a few practical consequences:
- Cold start is deterministic and fast. There is no module resolution, no JIT warm-up, no
require()cache. The binary starts in milliseconds. eval,new Function(), and dynamicrequire()/import()work. Code that can be resolved at compile time is compiled ahead of time as normal. A call that can’t — a runtimeeval, arequire()with a variable path — still works; it just isn’t a compile error.
TypeScript support
Section titled “TypeScript support”Pure supports TypeScript 6.0 syntax, including decorators. Type annotations
are stripped at compile time — Pure does not type-check your code, so run
tsc --noEmit or use your editor’s type checker to catch type errors before
you build.
JavaScript version
Section titled “JavaScript version”Pure targets ES2022 and later, including CommonJS (require()) for
compatibility. Node.js and Bun compatibility is tested against Node.js
26.6.0 and Bun 1.4.0.
Sections
Section titled “Sections”- OS support — platform targets, libc options, binary characteristics