OS & Platform Support
Supported targets
Section titled “Supported targets”| Platform | Architecture | Minimum OS | glibc |
|---|---|---|---|
| Linux | x86_64 | Debian 11 / Ubuntu 20.04 | 2.31+ |
| Linux | aarch64 | Debian 11 / Ubuntu 20.04 | 2.31+ |
| macOS | x86_64 (Intel) | macOS 12 Monterey | — |
| macOS | arm64 (Apple Silicon) | macOS 12 Monterey | — |
| Windows | — | Not yet supported | — |
Windows support is planned. Follow the changelog for updates.
glibc vs musl
Section titled “glibc vs musl”Pure binaries on Linux are dynamically linked against glibc. They do not run natively on Alpine Linux (musl libc).
Workaround for Alpine: Install gcompat (glibc compatibility layer):
apk add gcompatOr use libc6-compat:
apk add libc6-compatAfter installing the compatibility package, Pure binaries run without modification.
Alternatively, compile and run your binary in a Debian or Ubuntu container for full compatibility without a shim layer.
Binary size
Section titled “Binary size”| Workload | Release mode | Debug mode |
|---|---|---|
| Hello world | ~2 MB | ~5 MB |
| HTTP server | ~4–6 MB | ~10–15 MB |
| CLI with multiple dependencies | ~10–20 MB | ~25–45 MB |
Debug mode binaries are larger because they include additional diagnostics and are not optimized. Use --release for production builds.
Stripping the binary reduces size further (typically 20–40% on Linux):
strip ./myappmacOS binaries are stripped by default. Use dsymutil to extract debug symbols separately if needed.
Cold start
Section titled “Cold start”Pure binaries start fast because there is no module resolution, cache warm-up, or JIT compilation at startup. Typical cold start times:
| Workload | Approximate cold start |
|---|---|
| Hello world | < 5 ms |
| HTTP server (first request) | < 20 ms |
| CLI with heavy initialization | 30–100 ms |
These are wall-clock measurements on commodity hardware. Actual times depend on binary size, filesystem speed, and system load.
Signals
Section titled “Signals”Standard POSIX signals work: SIGINT, SIGTERM, SIGHUP, SIGUSR1, SIGUSR2. Register handlers via process.on('SIGTERM', ...) as you would in Node.
File descriptors and resource limits
Section titled “File descriptors and resource limits”The binary inherits ulimit settings from the parent process. The default open file descriptor limit (1024 on most Linux systems) applies. Use ulimit -n <value> or adjust /etc/security/limits.conf if your program opens many connections.
Cross-compilation
Section titled “Cross-compilation”Cross-compilation (building a Linux binary from macOS, or aarch64 from x64) is not currently supported. To produce a binary for a specific platform, run pure build on that platform. Cloud-based cross-compilation is on the roadmap.