Thinpack v0.3.1: Pack tsc into 6.5–9.0 MiB with Rust + QuickJS (vs 109.6 MiB in Bun) →

Compile a Node.js App into a Small .exe

Most tools that compile Node.js to a Windows .exe produce 100–150+ MiB files because they copy the entire Node/Bun runtime. Thinpack.js builds a minimal standalone executable so end users can double-click or run your CLI with zero Node.js or npm install.

Step 1: Download & Run on Windows x64

Grab the Windows x64 archive from GitHub Releases (you can verify its hash against SHA256SUMS), extract it, keep thinpack.exe alongside its runtime template on your build machine, and pack your script:

Windows x64 PowerShell
'console.log("Hello from Thinpack!")' | Set-Content -Encoding Ascii hello.js
.\thinpack.exe pack hello.js -o hello.exe
.\hello.exe

Step 2: Bundle Configs, Data Files, & Assets

Executable Size Comparison: Thinpack vs Bun & Node SEA

Every tool below was measured on Linux x86_64 in docs/benchmarks.md; on Windows x64, Thinpack follows the same capability-trimmed QuickJS (or optional V8) architecture rather than shipping a 100+ MiB runtime copy:

Program Thinpack (MiB) Bun 1.4.4 (MiB) Node 26.8.1 SEA Thinpack cold / warm SEA startup
Hello World
hello.js
4.03 (~1.80 gz) 104.10 143.70 — Failed
tsc (ts 5.9)
typescript@5.9.3
9.00 (5.65 gz) 109.63 (50.19 gz) 149.82 (45.35 gz) 578 / 347 ms 77 ms
ESLint 10
eslint@10.15.0
6.93 (3.60 gz) 107.15 (49.78 gz) 147.25 (44.96 gz) 288 / 186 ms 64 ms
Prettier 3
prettier@3.10.1
7.41 (4.14 gz) 110.04 (50.85 gz) 143.57 (44.32 gz) 235 / 155 ms Failed
Terser 5
terser@5.51.2
6.06 (2.91 gz) 105.38 (49.48 gz) 144.94 (44.57 gz) 226 / 145 ms 35 ms
js-yaml 5
js-yaml@5.5.0
5.80 (2.69 gz) 104.29 (49.28 gz) 143.75 (44.37 gz) 150 / 100 ms Failed
pi-coding-agent
@earendil-works/pi-coding-agent@1.5.0
12.42 (7.16 gz) 115.24 (51.30 gz) 157.75 (46.94 gz) 983 / 702 ms Failed

Step 3: Check Native Addon, CLI Flags, & Multi-OS Limits

Thinpack never loads N-API or C++ .node native addons; native bindings must use node:ffi. Before distributing a .exe to end users, copy the generated .exe into an empty folder without node_modules and run your primary subcommands (remember process.argv is [execPath, invokedPath, ...args], and the only reserved runtime switch is --warm-cache). To build Linux and macOS binaries alongside your Windows .exe, wire the GitHub Actions release matrix.

Frequently Asked Questions

Does an end user need Node.js installed to run a Thinpack .exe on Windows?

No. Running thinpack.exe pack app.js -o app.exe outputs a single standalone Windows x64 executable that runs without Node.js, Bun, or npm install.

How do I verify the Windows release archive before packing?

Download the matching Windows x64 archive from GitHub Releases and verify its checksum against the published SHA256SUMS file before running thinpack.exe pack.

Can I build Windows .exe binaries from macOS or Linux?

No—Thinpack does not cross-compile. Use the official thinpack-js/thinpack.js GitHub Action on windows-latest alongside ubuntu-24.04 and macos-latest to publish binaries for all platforms automatically.

What if my Node.js app reads templates, JSON configs, or binary assets?

Static fs.readFileSync/readdir paths built from __dirname are detected automatically. Pass extra dynamic files via --include <path> (mounted under /app) or --asset key=path for node:sea.

Related Guides & Benchmarks

Vercel pkg & nexe Alternative →

Compare Thinpack against @yao-pkg/pkg, Node SEA, Bun, and Deno.

Automate Windows + Linux + macOS Builds →

Copy-paste CI matrix workflow with SHA256SUMS release uploads.

Compile TypeScript Directly →

Pack .ts files into binaries without running tsc first.

Ship 4–12 MB Node.js binaries. Star thinpack.js on GitHub.

thinpack.js is 100% MIT-licensed and actively developed in Rust + JavaScript. Star the repository to follow releases or request compatibility fixtures for your favorite CLI.