AMAZINGINDEX.COM 日报快照
57.4
VOL. 2026.06
2026.06.25
← 返回 2026.06.25 日报
日报快照 · Daily Snapshot
NO. 019

Rust 重写 Node 工具链,提速 24 倍

#ARTICLE HackerNews 2026.06.25
推荐指数 52.0 NO. 019 · 2026.06.25
发布2026/06/24Score147Comments37

Nub 用 Rust 构建了一套 Node.js 工具集,直接复用 stock Node 而非替换运行时,覆盖运行、包管理、脚本执行和版本管理。对厌倦 Bun 生态割裂但又想要高性能 DX 的团队,这是零迁移成本的替代方案。

Bun 的最大阻力从来不是性能,而是兼容性和生态割裂——你需要改 Dockerfile、CI 脚本、调试工具链。Nub 的聪明之处在于锚定 stock Node,用 Rust 只做"工具层加速",规避了运行时替换的政治风险。

之前这个赛道有 tsx、dotenv-cli、volta、fnm 等碎片化工具,Nub 试图用统一 CLI 收编。但真正的考验是 pnpm 的依赖树优化和 Corepack 的博弈,2.5x install 提升在 monorepo 场景下是否成立需要实测。

如果你团队还在 node + tsx + pnpm + fnm 的拼盘配置里挣扎,Nub 值得作为单一工具链试点,尤其适合想保留 Node LTS 稳定性又馋 Bun 速度的基建团队。

正面 37 条评论

核心争论:Nub 以零迁移成本实现 Node 工具链 Rust 化,能否在 Bun 生态割裂与原生性能间找到可持续定位

colinmcd

Colin here, creator of Nub. I’ve had the general shape of this in mind for years. Nub runs your code with stock `node`, augmented with a `--require` preload hook[0] that adds a transpiler (oxc-powered, packaged as a Node-API add-on), registers a module resolution hook[1], and injects polyfills as ne

awaseem

I saw this on twitter and loved it, such a good move on your part Colin. Hope the project picks up tons of steam!

eyelidlessness

I’m surprised to see this using a `--require` hook (rather than `--import`). Maybe something’s changed significantly since I was looking into building some similar functionality… but it makes me wonder about nuances in nub’s ESM support. (When I was investigating this it was very early in Node’s `--

替代方案: BunCloudflare Workerswrangler
查看原文 →