Skip to content

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

Deno 3 min read Case study easyNovice

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

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.

Related posts

  • Self-contained Executable Programs with Deno Compile

    Deno mediumAdept

    `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.

  • 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.9

    Deno mediumAdept

    Deno 2.9 introduces experimental `deno desktop`, which compiles a web UI plus Deno logic into a single native binary using either the OS webview or bundled Chromium via CEF, with native window, tray and dock APIs and cross-compilation to installers for all five targets. `deno install` now seeds `deno.lock` from npm, pnpm, yarn and Bun lockfiles with exact versions and hashes, migrates pnpm workspace config, and shims `node` for tools that shell out to it. Cold start drops from 34ms to 17ms through lazy-loaded Node globals, V8 code caching and a minified snapshot. A new Rust HTTP/1.1 path raises `Deno.serve` throughput 11–27% and cuts peak RSS by 2.2–3.1x. The release also adds CSS module imports, `deno link`/`deno list`, JSR packages in node_modules and automatic lockfile merge-conflict resolution.

  • Roll your own JavaScript runtime, pt. 2

    Deno mediumAdept

    A custom JavaScript runtime built on deno_core gains three capabilities: a fetch op backed by the reqwest crate and registered in the runjs extension, a CLI that takes the script path as its first argument, and TypeScript/TSX support. TypeScript support comes from a custom TsModuleLoader that implements deno_core's ModuleLoader trait. It picks a MediaType from the file extension and uses deno_ast to parse and transpile TS, TSX and JSX into JavaScript before handing the module to JsRuntime. The whole runtime stays around 154 lines of Rust.

  • Build a Cross-Platform CLI with Deno in 5 minutes

    Deno mediumAdept

    Deno's built-in tooling covers the full path to a small cross-platform CLI, shown here by building `greetme-cli`. The std `flags` module's `parse()` handles argument parsing with typed flags, aliases and defaults. Deno KV persists settings across runs and needs an explicit path when compiled, and the web `prompt()` API handles interactive input. The tutorial finishes with `Deno.test` for unit tests and `deno compile` to ship a single executable binary, noting the required `--unstable`, `--allow-read` and `--allow-write` flags.

The quest for software engineering knowledge.

Look:
Layout: