Show HN: Nub – A Bun-like all-in-one toolkit for Node.js

257 points · 73 comments on HN · read original →

Points and comments are a snapshot, not live.

Nub is a Rust-based Node.js toolkit that augments Node with TypeScript, faster script running, and package management.

Nub is a Rust-written, Bun-like toolkit that sits on top of stock Node.js rather than replacing it. It provides a file runner with TypeScript, JSX, and automatic .env loading; a script runner (`nub run`) benchmarked at 14.7 ms versus 442.7 ms for pnpm; a package runner (`nubx`) that runs local bins ~19× faster than npx; and a package manager powered by the Aube engine that installs dependencies 2.5× faster than pnpm. It also includes Node version management via `nub node` and Corepack-style shims via `nub pm`. Nub uses Node's `--import`/`--require` hooks and `module.registerHooks()` to add features without a custom runtime. The project is MIT-licensed.

The file runner supports `.js`, `.ts`, `.jsx`, and other extensions, and can auto-install the Node version expected by the project. Watch mode tracks the resolved dependency graph and off-graph invalidators like `.env` files and `tsconfig.json`. The package manager operates in compat-mode, reading config from the incumbent package manager (npm, pnpm, Yarn, or Bun) when detected.

What commenters are saying

The thread is largely positive, with commenters praising the project's approach of augmenting rather than replacing Node.js. Several users note they are already migrating monorepos to Nub. Some questions surface about Cloudflare Workers support (the author says no, though the package manager could be used) and Docker compatibility (yes, with a recommendation for Node 22.15+ for best performance). A few commenters express skepticism about the "rewrite in Rust" approach and note the project is heavily AI-vibe-coded (Claude is the second contributor). One critic argues that Node's fundamental design issues (like JSON-only package.json) can't be fixed by augmenting it, which others counter by pointing to the io.js/CoffeeScript precedents of forks improving the ecosystem.