An extremely fast JavaScript, TypeScript, JSX and CSS bundler with a CLI, JS and Go API.
vercel-labs/scriptc
A experimental TypeScript and JavaScript compiler that turns programs into native executables or WebAssembly, without requiring Node.js at runtime.
- Stars
- 6,238
- Forks
- 191
- Open issues
- 56
- Last commit
- 6 hours ago
What is it?
scriptc compiles TypeScript and JavaScript to native executables and WebAssembly. It uses the types checked by the TypeScript compiler to generate machine code, and the output runs without Node.js installed. npm packages a program imports are compiled into the executable along with it.
The project is experimental and supports a subset of JavaScript, TypeScript, and Node.js APIs. Code it cannot compile is reported at build time with a diagnostic and, where available, a rewrite hint. The `scriptc coverage` command reports how much of an existing program compiles before you build it.
The compiler installs via npm and runs on macOS, Linux, and Windows. Building executables requires a linker and the platform SDK or sysroot. Supported Node APIs such as `node:http` compile to the native runtime.
Key features
- 01Compiles TypeScript and JavaScript to native executables.
- 02Compiles to WebAssembly (WASI modules).
- 03Uses TypeScript type information to generate machine code.
- 04Bundles imported npm packages into the output binary.
- 05Reports unsupported code at build time with diagnostics.
- 06Includes a coverage command to check compatibility before building.
Use cases
- Shipping a CLI tool as a single binary that runs without Node.js installed.
- Checking how much of an existing TypeScript program can compile to native code.
- Building WASI modules from TypeScript for embedding.
- Running small Node-style HTTP servers as standalone executables.
Quick start
- 1
Install the compiler globally with npm (Node.js 24+)
npm install -g scriptc - 2
Create hello.ts with a short program (file content from the README)
- 3
Compile and run the program directly
scriptc run hello.ts - 4
Build a standalone executable
scriptc build hello.ts -o hello >/dev/null
Things to know
- Experimental: it supports only a subset of JavaScript, TypeScript, and Node.js APIs.
- Building executables requires a linker and the platform SDK or sysroot.
- npm package support is partial.
Topics
FAQ
- What is scriptc?
- A experimental TypeScript and JavaScript compiler that turns programs into native executables or WebAssembly, without requiring Node.js at runtime. scriptc compiles TypeScript and JavaScript to native executables and WebAssembly. It uses the types checked by the TypeScript compiler to generate machine code, and the output runs without Node.js installed. npm packages a program imports are compiled into the executable along with it.
- Is scriptc free to use? What license does it have?
- scriptc is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is scriptc still maintained?
- Actively maintained. The last commit to scriptc was on Oct 19, 2026.
- What can I use scriptc for?
- Shipping a CLI tool as a single binary that runs without Node.js installed. Checking how much of an existing TypeScript program can compile to native code. Building WASI modules from TypeScript for embedding. Running small Node-style HTTP servers as standalone executables.
- How do I install scriptc?
- Install the compiler globally with npm (Node.js 24+): npm install -g scriptc Create hello.ts with a short program (file content from the README) Compile and run the program directly: scriptc run hello.ts Build a standalone executable: scriptc build hello.ts -o hello >/dev/null
- Where can I get scriptc?
- The source code and installation instructions are on GitHub: https://github.com/vercel-labs/scriptc
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Desktop, mobile, web and CLI app for running and orchestrating multiple coding agents such as Claude Code, Codex and OpenCode in parallel worktrees.
A local proxy that lets Codex, Claude Code, Claude Desktop and Grok Build run any LLM provider.
A JavaScript library and CLI that converts JS source code into SVG flowcharts, with abstraction levels, code-block modifiers and themes.
A CLI tool that opens a local GitHub-style web viewer for reviewing git commit diffs, with comments you can copy as AI prompts.
An open source AI coding agent that runs in your terminal, with a desktop app and two built-in agents for building and planning changes.