Skip to content

Build Output

By default pure build writes the downloaded binary to the current directory, named after the entry file without its extension:

Entry fileDefault output
server.ts./server
src/main.ts./main
cli/index.js./index

Pass -o/--out to choose an exact path:

Terminal window
pure build src/main.ts --release --out dist/myapp

The binary is written with mode 0755, so it’s immediately executable:

Terminal window
./dist/myapp

Builds run in the cloud and target Linux. Cross-compilation to other operating systems is not currently available.

PlatformMinimum OS
Linux x86_64glibc 2.31 (Debian 11 / Ubuntu 20.04)
Linux aarch64glibc 2.31

Pure binaries are dynamically linked against glibc. Running on Alpine Linux (musl) requires a compatibility layer such as gcompat. See Language → OS support for details.

Release binaries include the Pure runtime. Typical sizes:

WorkloadApproximate size
Hello world~2 MB
HTTP server~4–6 MB
Complex CLI with deps~10–20 MB

Strip the binary with strip to reduce size further:

Terminal window
strip ./myapp

Passing --target node-addon produces a Node.js native addon instead of a standalone executable. The downloaded artifact (written to --out) is an installable npm tarball that you install like any other package:

Terminal window
pure build src/index.ts --release --target node-addon --out ./mypkg.tgz
npm install ./mypkg.tgz

The tarball contains the compiled .node addon, a small index.js shim, the preserved TypeScript types, and a package.json whose name and version are inherited from your project. --target node-addon therefore requires a package.json at or above your entry file.

Once installed, consumers require() it as usual:

const mypkg = require('mypkg');