Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Deno 5 min read How-to mediumAdept

Self-contained Executable Programs with Deno Compile

`deno compile` turns JavaScript and TypeScript programs into standalone binaries for Windows, macOS and Linux that run without Deno installed. It works by bundling the module graph into an eszip file and injecting it with Sui into a slimmed-down runtime binary, denort. Because the bundle sits in a section of the executable, the result can still be code signed. Examples cover cross-compiling with `--target`, custom icons, preserved permission flags, and compiling npm itself, which ran about 1.9x faster on `npm -v`. Assets can be embedded as base64-encoded modules until native asset bundling arrives.

Related posts

  • Deno 1.34: deno compile supports npm packages

    Deno mediumAdept

    Deno 1.34 lets `deno compile` bundle npm packages and their dependencies into a single self-contained executable. That makes tools like vite and eslint shippable as binaries with pinned dependencies, and they tend to start faster than running from a local cache. The release also adds cross-platform glob support in deno.json, deno task and CLI flags, and TLS certificates with IP addresses via rustls. Smaller changes include a top-level `exclude` and `nodeModulesDir` in config, configurable language-server limits, a `Deno.serve()` signature change that returns a `Deno.Server`, new `createHttpClient` pool options, more Node.js polyfills, and upgrades to V8 11.5 and TypeScript 5.0.4.

  • Deno 2.3: Improved deno compile, local npm packages, and more

    Deno mediumAdept

    Deno 2.3 lets deno compile bundle programs that use FFI and Node native add-ons, adds --include/--exclude control over embedded files, and exposes Deno.build.standalone to detect compiled binaries. Local npm packages can now be used through a "patch" entry in deno.json. deno fmt gains formatting of CSS, HTML and SQL in tagged templates plus 14 new options, and OpenTelemetry support adds span events, cross-service context propagation, node:http auto-instrumentation and V8 heap metrics. deno install is about 2x faster when npm dependencies are cached, thanks to in-memory npm metadata caching and lockfile v5, with a benchmark showing 2.5x on a Vite React template. The release also adds the JavaScript `using` keyword, coverage ignore comments and TypeScript 5.8 with V8 13.5.

  • How the creator of Homebrew simplifies distributing software with tea and Deno

    Deno easyNovice

    tea, Max Howell's successor to Homebrew, is written in TypeScript and shipped as a single executable via `deno compile`, avoiding the Node install / npm install friction of distributing JS tools. Its GitHub Actions release pipeline runs on Deno's built-in toolchain (deno test, deno lint, deno compile) to target Windows, macOS x64/ARM and Linux. The brewkit build infrastructure is a set of self-contained Deno scripts that use URL imports and YAML frontmatter instead of per-script package manifests, so each script can run standalone or be composed into CI steps.

  • Deno 2.6: dx is the new npx

    Deno mediumAdept

    Deno 2.6 adds `dx`, an npx equivalent for running npm and JSR package binaries that defaults to full permissions, prompts before download and runs lifecycle scripts. It also adds `--ignore-read`/`--ignore-env` flags that return NotFound/undefined instead of NotCapable errors, plus an experimental permission broker process for mediating permission requests. Other changes include opt-in type checking with the Go-based tsgo (about 2x faster on internal projects), Wasm source phase imports, `--require` for preloading CommonJS, and `deno audit` with optional socket.dev integration. Supply-chain controls include `deno approve-scripts` and a `minimumDependencyAge` setting, alongside bundler fixes, default `@types/node`, and many Node.js API compatibility fixes.

  • Deno 2.4: deno bundle is back

    Deno mediumAdept

    Deno 2.4 brings back `deno bundle`, now built on esbuild, producing single-file bundles for Deno or browser targets with tree shaking, minification, sourcemaps and npm/JSR dependency support. Text and bytes imports via import attributes (behind `--unstable-raw-imports`) let assets be embedded in bundles and `deno compile` binaries. Built-in OpenTelemetry is now stable, and the release adds a `--preload` flag, a `deno update` command, `deno run --coverage`, a `DENO_COMPAT=1` mode for package.json-first projects, and conditional package.json exports. `--allow-net` gains subdomain wildcards and CIDR ranges, a new `--deny-import` flag blocks specific hosts, and `Deno.execPath()` no longer requires read permission, which avoids pushing users toward a blanket `--allow-read`.

The quest for software engineering knowledge.

Look:
Layout: