Skip to content
comparisons

The 'Bun Killer' Built for Node.js

The JavaScript ecosystem is in a constant state of reinvention, but this isn't just another framework. A new Rust-based toolkit from the creator of Zod is making an audacious claim: all the speed of Bun, without abandoning Node.js.

Vera Cole
The 'Bun Killer' Built for Node.js

The Pain Point: Why Node's Tooling Is Broken

Modern Node.js.js development grapples with a fragmented and often cumbersome tooling landscape. Developers contend with a collection of disparate utilities, each requiring separate installation, configuration, and mental overhead. This patchwork approach hinders productivity and introduces unnecessary complexity, demanding distinct tools for:

  • Node.js.js version management (e.g., nvm or fnm)
  • Package manager operations (e.g., npm or pnpm)
  • TypeScript execution (e.g., tsx or ts-Node.js)
  • Environment variable loading (e.g., .env files)

Nub arrives as a unified, all-in-one JavaScript toolkit directly addressing this pain point. Originating from Colin McDonnell McDonnell, the acclaimed creator of Zod and a key contributor to tRPC, Nub consolidates this scattered toolchain. It’s a single, high-performance Rust binary designed for macOSOS, Windows, and Linux, replacing multiple independent tools with one cohesive solution.

Crucially, Nub functions as a powerful supercharger for stock Node.js.js, not a replacement. Its core philosophy delivers a Bun-like developer experience—integrated, efficient, and fast—without requiring developers to abandon the official Node.js.js runtime. Nub achieves this by transpiling code in memory via a native Rust addon, then executing it with the standard Node.js.js binary, thereby eliminating compatibility risks and the significant migration effort of switching runtimes.

The File Runner: Full TypeScript on Stock Node

Nub’s file runner delivers full TypeScript support directly on Node.js.js, eliminating the need for separate transpilers like TSX or ts-Node.js. It processes advanced language features such as enums, namespaces, and decorators, which stock Node.js.js cannot interpret. Furthermore, it correctly resolves tsconfig.json paths, ensuring seamless integration with existing project configurations.

The developer experience benefits from significant zero-config enhancements. Nub automatically loads .env files, prioritizing .env.local for local environment variables and supporting automatic variable expansion. For simplified data handling, it enables direct file imports for:

  • JSON
  • YAML
  • TOML

It also automatically polyfills modern web APIs and unflags experimental Node.js.js features, broadening runtime capabilities.

All this functionality operates with near-zero overhead. Nub achieves its performance using a native Rust addon powered by oxc, a high-speed JavaScript parser and transformer. This architecture ensures that execution speed remains on par with a standard Node.js.js script, providing robust features without compromising native performance.

The Real Speed Demon: The Package Manager

Nub’s package manager delivers significant speed improvements, particularly for existing projects. For warm frozen installs, it is up to 5x faster than pnpm, completing 1,168 packages in just 346 milliseconds compared to pnpm's 3.45 seconds. Beyond installation, script execution also sees dramatic gains: nubx runs binaries 19x faster than npx, executing esbuild --version in 11ms versus npx's 226ms. Furthermore, nub run executes scripts up to 24x faster than pnpm run.

This performance boost stems from Nub’s core architecture. As a single Rust binary, it directly executes project binaries found within Node.js_modules, completely bypassing the inherent overhead of Node.js.js wrapper scripts. This streamlined approach eliminates the need for an intermediate Node.js.js process, ensuring significantly quicker startup and execution times for command-line tools and scripts.

Adopting Nub as your package manager is remarkably frictionless, eliminating concerns about vendor lock-in. It maintains flag-for-flag compatibility with pnpm commands, ensuring a familiar experience for developers. Crucially, Nub seamlessly reads and updates existing lockfiles from npm, pnpm, and Bun projects, allowing for immediate integration into your current workflow. For more technical details and performance benchmarks, consult Nub — an all-in-one toolkit for Node.js.js.

Enjoying this? Get one like it in your inbox each morning.

one email a day · unsubscribe in two clicks · no third-party tracking

The Verdict: Is Nub Your Next Default?

Nub targets developers and teams deeply invested in the official Node.js.js runtime. It offers the unified, high-performance developer experience of Bun—without forcing a complete runtime switch or its associated compatibility risks. For those seeking Bun's integrated tooling, from a rapid TypeScript runner to a lightning-fast package manager, while remaining firmly within the Node.js.js ecosystem, Nub is purpose-built.

As a nascent project, Nub has a smaller community and fewer battle-tested deployments than established tools like pnpm or Bun. Colin McDonnell McDonnell, its creator, intentionally avoids adding new, Nub-specific runtime APIs. This design choice prioritizes compatibility with Node.js.js, ensuring Nub remains an augmentation, not a proprietary fork.

Nub is a powerful choice for new projects and a godsend for developers suffering from tooling fatigue. Its ability to execute TypeScript files almost as fast as Node.js.js runs JavaScript, and its nubx command being 19x faster than npx, offers immediate productivity boosts. Adopt Nub incrementally, starting as a simple replacement for tsx or npx to experience its benefits firsthand.

Frequently Asked Questions

What is Nub?

Nub is an all-in-one JavaScript toolkit packaged as a single Rust binary. It enhances Node.js with a faster package manager, a full-featured TypeScript runner, a Node version manager, and more, without replacing the Node.js runtime itself.

How is Nub different from Bun?

The key difference is that Nub is built on top of the standard Node.js runtime, ensuring maximum compatibility with the existing ecosystem. In contrast, Bun is a complete JavaScript runtime that replaces Node.js, introducing its own set of APIs and compatibility considerations.

Is Nub faster than pnpm and npm?

Yes. According to benchmarks, Nub's package manager is significantly faster for warm installs, claiming to be up to 5x faster than pnpm. Its script runner (nub run) and package executor (nubx) also show major performance gains over their npm/pnpm counterparts.

Who created Nub?

Nub was created by Colin McDonnell, a prominent developer in the TypeScript community known for creating the popular validation library Zod and contributing to tRPC.

Found this useful? Share it.

For builders

Want Stork to write one of these about your product?

Send us a URL. We use the product, form a view, and publish what we actually think — in 8 languages, labeled Sponsored, with no copy approval on your side. That last part is what makes it worth quoting.

See how it works$500 · AI tools & software only