0
异步视界/frontend-2026-radar/leerob-rust-fulltext
· FRONTEND-2026-RADAR · 2026.05.05 · 47 MIN ·

Lee Robinson —《Rust 正在吞噬 JavaScript》(全文)

leerob.com/rust 完整逐段翻译 + 译注。Rust 在 JS 工具链(Vite / Turbopack / Oxc / Biome / Tailwind v4 / Deno 2.0)的全面接管;附 2023 / 2026 两次更新。 · by fancyoung
AI · HERO seed:4020260505 leerob.com/rust 完整逐段翻译 + 译注。Rust 在 JS 工具链(Vite / Turbopack / Oxc / Biome / Tailwind v4 / Deno 2.0)的全面接管;附 2023 / 2026 两次更新。
FIG.00 — cover · ai-generated · placeholder

原文: https://leerob.com/n/rust 作者: Lee Robinson(Vercel VP,前 Next.js 团队负责人,Vercel 官方布道者) 原文写作时间: 2021 年首发,2023、2026 两次更新 本译版定位: 完整逐段翻译 + 译注。配套精读:VoidZero / Vite+ / Rolldown:Rust 化前端工具链总集篇

译者前言

这是一篇罕见的”五年期前瞻验证”案例。2021 年 Lee Robinson 写下”Rust is the future of JavaScript tooling”时,这只是一句带有 Vercel 立场的大胆预测;到 2026 年回看,他几乎全部押对——Turbopack、Rolldown、Oxc、Biome v2、Rspack、Tailwind v4 Oxide、Deno 2.0,清单上没一个落下。这种”押注 + 自我打分”的写作结构,本身就值得做内容策展时学习。

对中文前端读者,这篇三个层面有用:

第一层,它是 Rust 化趋势的总目录。如果你只想搞清楚 2021—2026 五年间 JS 生态发生了什么,不需要每一个 RFC 都去翻原文,这一篇是最经济的入口。文末”2026 Update”列出的 7 个工具,基本就是 2026 年 Rust 化前端工具链的最小阅读清单。

第二层,它解释了”为什么不是 Go,而是 Rust”。文中 Evan You 当年偏爱 Go 的原因(写起来更快乐)、和 2025 年他自己融资 1250 万美金创办 VoidZero 全面押注 Rust 的反转,构成了一个非常戏剧化的对比。这个反转不是个人偏好的转变,是行业基础设施成熟度的拐点信号。

第三层,它点出了一个反直觉的趋势:AI coding agent 在 2025 H2 之后大幅加速了 Rust 的渗透。Lee 自己用 agent 写了 38000 行 Rust 没有任何 runtime 依赖,这说明 Rust 严格的编译器对 AI 生成代码反而是天然的”质量门”。如果你在思考”AI 时代我学什么语言性价比最高”,这一段值得停下来读三遍。


Rust 正在吞噬 JavaScript

原文:Rust is a fast, reliable, and memory-efficient programming language. It’s been voted the most admired programming language for a decade. Created by Mozilla, it’s now used at Meta, Apple, Amazon, Microsoft, and Google for systems infrastructure, encryption, virtualization, and more low-level programming.

Rust 是一门快、可靠、内存高效的编程语言。它已经连续 10 年被票选为最受推崇的编程语言。Rust 由 Mozilla 创造,如今已被 MetaAppleAmazonMicrosoftGoogle 等公司用于系统基础设施、加密、虚拟化以及其他底层编程。

🟢 译者注:Stack Overflow 这个榜单 2023 年之前叫 “most loved”,之后改名 “most admired”。Rust 从 2016 年至今每年都拿这个榜的冠军,到 2025 年正好是连续十届——这是 Lee 文中说”a decade”的来源(见文末脚注 1)。

原文:Why is Rust now being used to replace parts of the JavaScript web ecosystem like minification (Terser), transpilation (Babel), formatting (Prettier), bundling (webpack), linting (ESLint), and more?

那么,为什么 Rust 现在被用来替代 JavaScript 网页生态里的一系列环节——压缩(Terser)、转译(Babel)、格式化(Prettier)、打包(webpack)、代码检查(ESLint),还有更多?

什么是 Rust?

原文:Rust helps developers write fast software that’s memory-efficient. It’s a modern replacement for languages like C++ or C with a focus on code safety and concise syntax.

Rust 帮开发者写出运行快、内存使用高效的软件。它是 C++ 或 C 这类语言的现代替代品,关注点放在代码安全(code safety)和简洁语法上。

原文:Rust is quite different than JavaScript. JavaScript tries to find variables or objects not in use and automatically clears them from memory. This is called Garbage Collection. The language abstracts the developer from thinking about manual memory management.

Rust 与 JavaScript 差别很大。JavaScript 会尝试找出已经不再使用的变量或对象,自动把它们从内存里清理掉,这就是所谓的垃圾回收(Garbage Collection)。这门语言把”手动管理内存”这件事从开发者面前抽象走了。

原文:With Rust, developers have more control over memory allocation, without it being as painful as C++.

而在 Rust 里,开发者对内存分配有更多控制权,但不像在 C++ 里那么痛苦。

原文:> Rust uses a relatively unique memory management approach that incorporates the idea of memory “ownership”. Basically, Rust keeps track of who can read and write to memory. It knows when the program is using memory and immediately frees the memory once it is no longer needed. It enforces memory rules at compile time, making it virtually impossible to have runtime memory bugs. You do not need to manually keep track of memory. The compiler takes care of it. – Discord

Rust 用了一种相对独特的内存管理方式,把”所有权(ownership)“这个想法纳入其中。简单说,Rust 一直追踪谁能读、谁能写一块内存。它知道程序什么时候在使用某块内存,一旦不再需要就立刻把它释放掉。Rust 在编译期就强制执行这些内存规则,这让运行期内存 bug 几乎不可能发生。你不需要手动追踪内存,编译器替你处理。—— Discord

采用情况

原文:On top of the companies mentioned above, Rust is also being used for popular open-source libraries like:

除了上面提到的公司,Rust 也被一批热门开源项目使用:

原文:> Rust has been a force multiplier for our team, and betting on Rust was one of the best decisions we made. More than performance, its ergonomics and focus on correctness has helped us tame sync’s complexity. We can encode complex invariants about our system in the type system and have the compiler check them for us. – Dropbox

Rust 对我们团队来说是一个能力放大器,押注 Rust 是我们做过最对的决定之一。比起性能,它的人体工程学和对正确性的重视,帮我们驯服了同步系统的复杂度。我们可以把系统里复杂的不变量(invariants)编码进类型系统,然后让编译器替我们检查。—— Dropbox

从 JavaScript 到 Rust

原文:JavaScript is the most widely used programming language, operating on every device with a web browser. Over the past ten years, a massive ecosystem has been built around JavaScript:

JavaScript 是世界上使用最广泛的编程语言,运行在每一台带浏览器的设备上。过去十年里,围绕 JavaScript 已经搭起了一个庞大的生态:

  • Webpack:把多个 JavaScript 文件打包成一个。
  • Babel:写现代 JavaScript,同时支持老浏览器。
  • Terser:生成尽可能小的文件体积。
  • Prettier:用一套预设把代码格式化。
  • ESLint:在部署前发现代码里的问题。

原文:Millions of lines of code have been written and even more bugs have been fixed to create the bedrock for shipping web applications of today. All of these tools are written with JavaScript or TypeScript. This has worked well, but we’ve reached peak optimization with JS. This has inspired a new class of tools, designed to drastically improve the performance of building for the web.

数百万行代码、被修过的更多 bug,共同构成了今天 web 应用交付的基础。这些工具全部用 JavaScript 或 TypeScript 写成。一直运行得不错,但我们已经触到了 JS 的优化天花板。这激发了一批新工具的诞生,目标是从根本上把”为 web 构建”这件事的性能拉起来。

SWC

原文:SWC, created in 2017, is an extensible Rust-based platform for the next generation of fast developer tools. It’s used by tools like Next.js, Parcel, and Deno, as well as companies like Vercel, ByteDance, Tencent, Shopify, and more.

SWC 创建于 2017 年,是一个基于 Rust 的可扩展平台,用于下一代快速开发者工具。Next.js、Parcel、Deno 等工具都在用它,Vercel、ByteDance(字节跳动)、Tencent(腾讯)、Shopify 等公司也都在用。

原文:SWC can be used for compilation, minification, bundling, and more – and is designed to be extended. It’s something you can call to perform code transformations (either built-in or custom). Running those transformations happens through higher-level tools like Next.js.

SWC 可以用来做编译、压缩、打包等等,设计上就是为了被扩展。你可以直接调用它来执行代码变换(内置的或自定义的)。这些变换的实际运行,通常是通过 Next.js 这类更高层级的工具触发的。

Deno

原文:Deno, created in 2018, is a simple, modern, and secure runtime for JavaScript and TypeScript that uses V8 and is built with Rust. It’s an attempt to replace Node.js, written by the original creators of Node.js. While it was created in 2018, it didn’t hit v1.0 until May 2020.

Deno 创建于 2018 年,是一个简单、现代、安全的 JavaScript / TypeScript 运行时,基于 V8 引擎,用 Rust 构建。它是 Node.js 原作者尝试替代 Node.js 的产物。虽然 2018 年就开始,直到 2020 年 5 月才发布 v1.0

原文:Deno’s linter, code formatter, and docs generator are built using SWC.

Deno 的 linter、代码格式化工具、文档生成器,全部基于 SWC 构建

esbuild

原文:esbuild, created in January 2020, is a JavaScript bundler and minifier 10-100x faster than existing tools, written in Go.

esbuild 创建于 2020 年 1 月,是一个 JavaScript 打包器 + 压缩器,比现有工具快 10—100 倍,用 Go 写的

原文:> I’m trying to create a build tool that A) works well for a given sweet spot of use cases (bundling JavaScript, TypeScript, and maybe CSS) and B) resets the expectations of the community for what it means for a JavaScript build tool to be fast. Our current tools are way too slow in my opinion. – Evan, Creator of esbuild (Source)

我想做的事:A)在一组合适的用例上做好(打包 JavaScript、TypeScript,也许还有 CSS);B)重置整个社区对”一个 JavaScript 构建工具能有多快”的预期。我觉得我们当前的工具实在太慢了。—— Evan,esbuild 作者(来源)

🟢 译者注:这个 Evan 是 Evan Wallace(Figma 联创、esbuild 作者),不是 Evan You(Vue / Vite 作者)。两个 Evan 经常被混淆。

原文:Building JavaScript tooling with systems programming languages, like Go and Rust, was fairly niche until esbuild was released. In my opinion, esbuild sparked a wider interest in trying to make developer tools faster. Evan chose to use Go:

在 esbuild 发布之前,用系统级编程语言(比如 Go 或 Rust)来写 JavaScript 工具是个相当小众的方向。在我看来,esbuild 点燃了”让开发者工具更快”的更广泛的兴趣。Evan 当时选了 Go:

原文:> The Rust version probably could be made to work at an equivalent speed with enough effort. But at a high level, Go was much more enjoyable to work with. This is a side project and it has to be fun for me to work on it. – Evan, Creator of esbuild (Source)

Rust 版本只要花足够的精力,大概也能做到差不多的速度。但从大方向看,Go 用起来更愉快。这是个副业项目,得让我自己写起来开心才行。—— Evan,esbuild 作者(来源)

原文:Some argue Rust could perform better, but both could achieve Evan’s original goal of influencing the community:

也有人认为 Rust 性能上能更胜一筹,不过两者都能达成 Evan 最初的目标——影响整个社区:

原文:> Even with just basic optimization, Rust was able to outperform the hyper hand-tuned Go version. This is a huge testament to how easy it is to write efficient programs with Rust compared to the deep dive we had to do with Go. – Discord

即便只做基本的优化,Rust 版本也能跑赢我们手工精调到极致的 Go 版本。这有力地证明了:用 Rust 写高效程序,比起我们在 Go 上做的那些深度调优,要容易得多。—— Discord

Rome

原文:Rome, created in August 2020, is a linter, compiler, bundler, test runner, and more, for JavaScript, TypeScript, HTML, JSON, Markdown, and CSS. They aim to replace and unify the entire frontend development toolchain. It’s created by Sebastian, who also created Babel.

Rome 创建于 2020 年 8 月,集 linter、编译器、打包器、测试运行器等于一身,支持 JavaScript、TypeScript、HTML、JSON、Markdown、CSS。它的目标是替代并统一整个前端开发工具链。作者 Sebastian 同时也是 Babel 的作者。

原文:Why rewrite everything, then?

那为什么要把一切重写一遍?

原文:> Making the necessary modifications to Babel to allow for it to be a reliable base for other tools would have required changes to absolutely everything. The architecture is bound to the initial design choices I made in 2014 when I was learning about parsers, ASTs, and compilers. - Sebastian (Source)

要把 Babel 改造成”能作为其他工具可靠基础”的样子,得动到几乎每一处。它的架构被我 2014 年初学解析器、AST、编译器时做的设计选择牢牢绑定住了。—— Sebastian(来源)

原文:Rome is currently written in TypeScript and runs on Node.js. But they’re now working on rewriting in Rust using RSLint parser and their own visitor system for AST traversal.

Rome 当前用 TypeScript 写、跑在 Node.js 上。但他们正在着手用 Rust 重写,计划基于 RSLint 解析器,加上他们自研的 AST 遍历 visitor 系统。

🟢 译者注:这件事的后续——Rome 项目 2023 年被废弃,然后由社区分叉出 Biome。Biome 在 2025 年发布了 v2,带 type-aware linting,详见文末”2026 Update”。

NAPI

原文:Rust’s integration with Node.js is better than other low-level languages.

Rust 与 Node.js 的集成,比其他底层语言都要好。

原文:napi-rs allows you to build pre-compiled Node.js add-ons with Rust. It provides an out-of-the-box solution for cross-compilation and publishing native binaries to NPM, without needing node-gyp or postinstall scripts.

napi-rs 让你能用 Rust 构建预编译的 Node.js 插件。它提供了开箱即用的跨平台编译方案,还能直接把 native 二进制发布到 NPM,不需要 node-gyp 也不需要 postinstall 脚本

原文:You can build a Rust module that can be called directly from Node.js, without needing to create a child process like esbuild.

你可以构建一个能直接从 Node.js 调用的 Rust 模块,不必像 esbuild 那样还得开一个子进程

Rust + WebAssembly

原文:WebAssembly (WASM) is a portable low-level language that Rust can compile to. It runs in the browser, is interoperable with JavaScript, and is supported in all major modern browsers.

WebAssembly(WASM)是一种可移植的底层语言,Rust 可以编译到它。WASM 在浏览器里运行,与 JavaScript 互通,所有主流现代浏览器都支持。

原文:> WASM is definitely a lot faster than JS, but not quite native speed. In our tests, Parcel runs 10-20x slower when compiled to WASM than with native binaries. – Devon Govett

WASM 肯定比 JS 快很多,但还达不到 native 速度。在我们的测试里,Parcel 编译成 WASM 之后,跑起来比 native 二进制慢 10—20 倍。—— Devon Govett

🟢 译者注:Devon Govett 是 Parcel 的作者,后来又做了 Lightning CSS(也用 Rust 写的)。

原文:While WASM isn’t the perfect solution yet, it can help developers create extremely fast web experiences. The Rust team is committed to a high-quality and cutting-edge WASM implementation. For developers, this means you could have the performance advantages of Rust (vs. Go) while still compiling for the web (using WASM).

虽然 WASM 还不是完美方案,但它确实能帮开发者打造极快的网页体验。Rust 团队对一个高质量、前沿的 WASM 实现非常投入。对开发者来说,这意味着你能既享受 Rust(对 Go)的性能优势,又能把代码编译到 web(通过 WASM)。

原文:Some early libraries and frameworks in this space:

这一领域早期的一些库和框架:

原文:These Rust-based web frameworks that compile to WASM aren’t trying to replace JavaScript, but work alongside it. While we aren’t there yet, it’s interesting to see Rust coming after the web on both sides: making existing JavaScript tooling faster and future-forward ideas for compiling to WASM.

这些”基于 Rust、编译到 WASM”的 web 框架并不是要替代 JavaScript,而是和它并行工作。虽然现在还不到那个阶段,但很有意思——Rust 正从两个方向同时向 web 推进:让现有的 JavaScript 工具更快,同时也带来编译到 WASM 的前瞻性想法

原文:It’s Rust all the way down.

一路向下,全是 Rust。

🟢 译者注:“It’s X all the way down” 是英语圈里很常见的一个说法,源自一个老笑话——某位老太太说宇宙是由乌龟驮着的,被问”那只乌龟下面是什么”,她说”It’s turtles all the way down”(下面也是乌龟,一路下去都是乌龟)。这里 Lee 借用这个梗来表达”从工具链顶层到底层全是 Rust”。

那为什么不用 Rust?

原文:Rust has a steep learning curve. It’s a lower level of abstraction than what most web developers are used to.

Rust 学习曲线很陡。它的抽象层级,比大多数 web 开发者习惯的要低。

原文:Once you’re on native code (through Rust, Go, Zig, or other low-level languages), the algorithms and data structures are more important than the language choice. It’s not a silver bullet.

一旦你进入 native 代码(通过 Rust、Go、Zig 或其他底层语言),算法和数据结构比语言选择更重要。Rust 不是银弹。

原文:> Rust makes you think about dimensions of your code that matter tremendously for systems programming. It makes you think about how memory is shared or copied. It makes you think about real but unlikely corner cases and make sure that they’re handled. It helps you write code that’s incredibly efficient in every possible way. – Tom MacWright (Source)

Rust 强迫你思考一些代码维度,这些维度在系统编程里至关重要。它让你思考内存是怎么被共享或拷贝的;它让你思考那些真实存在但概率很低的边界 case,并确保它们被处理掉;它帮你在每一个可能的层面写出超高效率的代码。—— Tom MacWright(来源)

原文:Further, Rust’s usage in the web community is still niche. It hasn’t reached critical adoption. Even though learning Rust for JavaScript tooling will be a barrier to entry, interestingly developers would rather have a faster tool that’s harder to contribute to. Fast software wins.

更进一步看,Rust 在 web 社区里使用还属于小众,还没到关键采用规模。虽然为了写 JavaScript 工具而学 Rust 会构成入门门槛,但有趣的是,开发者宁愿用一个更快但更难贡献的工具快的软件最终胜出

🟢 译者注:文末脚注 4 给这一段做了”自我打分”:2026 年这条已经不成立了——几乎每一个主流 JavaScript 构建工具,都有了基于 Rust 的替代品或重写版。

原文:Currently, it’s hard to find a Rust library or framework for your favorite services (things like working with authentication, databases, payments, and more). I do think that once Rust and WASM reach critical adoption, this will resolve itself. But not yet. We need existing JavaScript tools to help us bridge the gap and incrementally adopt performance improvements.

当下,你想为常用服务(认证、数据库、支付等)找一个 Rust 库或框架,还很难。我相信一旦 Rust 和 WASM 达到关键规模,这个问题会自己解决。但现在还没到。我们需要现有的 JavaScript 工具来桥接这段差距,渐进式地引入性能提升

JavaScript 工具链的未来

原文:I believe Rust is the future of JavaScript tooling. Next.js 12 started our transition to fully replace Babel (transpilation) and Terser (minification) with SWC and Rust. Why?

我相信 Rust 是 JavaScript 工具链的未来。Next.js 12 开启了我们的转型——用 SWC 和 Rust 完全替换 Babel(转译)和 Terser(压缩)。为什么?

  • 可扩展性(Extensibility):SWC 可以作为一个 Crate 被嵌进 Next.js,不必 fork 这个库,也不必绕开它的设计约束。
  • 性能(Performance):切到 SWC 之后,Next.js 的 Fast Refresh 大约快了 3 倍,构建速度大约快了 5 倍,后续还有继续优化的空间。
  • WebAssembly:Rust 对 WASM 的支持,对于让 Next.js 在所有可能的平台上跑起来至关重要。
  • 社区(Community):Rust 社区与生态非常出色,而且还在持续增长。

原文:It’s not just Next.js adopting SWC, either:

不止 Next.js 在采用 SWC:

原文:> Parcel uses SWC like a library. Before we used Babel’s parser and custom transforms written in JS. Now, we use SWC’s parser and custom transforms in Rust. This includes a full scope hoisting implementation, dependency collection, and more. It’s similar in scope to how Deno built on top of SWC. – Devon Govett

Parcel 把 SWC 当作一个库来用。之前我们用 Babel 的 parser 加上 JS 写的自定义 transform,现在我们用 SWC 的 parser 加上用 Rust 写的自定义 transform。这里面包含一套完整的 scope hoisting 实现、依赖收集等等。规模上跟 Deno 在 SWC 之上构建的方式差不多。—— Devon Govett

原文:It’s early days for Rust – a few important pieces are still being figured out:

Rust 还处在早期阶段——有几个重要的环节还在被摸索:

  • 插件(Plugins):用 Rust 写插件,对许多 JavaScript 开发者来说还不够友好。但同时,如果暴露一个 JavaScript 插件系统,又会抵消性能收益。目前还没有一个明确的解法。理想情况下,未来会同时支持两种方式:你想用 JavaScript 写插件,可以,代价是速度;需要更高性能?用 Rust 插件 API。
  • 打包(Bundling):有意思的一个发展方向是 swcpack——SWC 对 Webpack 的替代品。还在开发中,但可能很有前景。
  • WebAssembly:如前所述,“用 Rust 写、编译到 WASM”这个前景很诱人,但还有很多工作要做。

🟢 译者注:文末脚注 5 给这两个预测做了打分——swcpack 最终没有发布,这块空缺被 RspackTurbopack 填上了。

原文:Regardless, I’m confident Rust will continue to have a major impact on the JavaScript ecosystem for the next 1-2 years and into the future. Imagine a world where all of the build tools used in Next.js are written in Rust, giving you optimal performance. Then, Next.js could be distributed as a static binary you’d download from NPM.

不论如何,我相信未来 1—2 年乃至更远,Rust 会持续深刻影响 JavaScript 生态。设想这样一个世界:Next.js 用到的所有构建工具都用 Rust 写成,给你最佳性能。然后,Next.js 可以以一个从 NPM 下载的静态二进制(static binary) 形式分发。

原文:That’s the world I want to live (and develop) in.

这就是我想要生活(和开发)的世界。

2023 年更新

原文:There was more investment into new Rust tooling in the JavaScript ecosystem. A few notable Rust projects include:

JavaScript 生态对新一代 Rust 工具的投入还在加码。一些值得关注的 Rust 项目包括:

  • Biome:本文前面提到过的 Rome,后来变成了 Biome。
  • Rspack:新的打包器,带 webpack 兼容性。
  • Pacquet (pnpm):Node.js 的实验性包管理器。
  • Rolldown:Vite 的新打包器(替代 esbuild 与 rollup)。
  • Oxc:类似 Biome,parser、linter、formatter、transpiler、minifier 等齐全。
  • Turbopack:为 Next.js 编译器提供动力的新打包器(状态)。
  • Lightning CSS:全新的 CSS parser、transformer、bundler、minifier。

原文:Further, Bun 1.0 was released, putting Zig on the map and working to speed up the entire JavaScript ecosystem.

此外,Bun 1.0 已经发布,这让 Zig 出现在了大众视野里,并努力加速整个 JavaScript 生态。

2026 年更新

原文:When I wrote this post in 2021, Rust replacing JavaScript tooling was my lofty prediction. In 2026, nearly every major JavaScript build tool now has a Rust-based alternative or has been rewritten in Rust. Many of the projects listed in the 2023 update above have shipped stable releases, including:

2021 年我写下这篇文章的时候,“Rust 替代 JavaScript 工具链”还只是我一个比较大胆的预测。到 2026 年,几乎每一个主流 JavaScript 构建工具,要么已经有了基于 Rust 的替代品,要么已经被 Rust 重写。2023 更新里提到的项目,很多都已经发布稳定版,包括:

  • Turbopack:已 stable,且是 Next.js 16 的默认打包器。生产构建快 2—5 倍,Fast Refresh 最快 10 倍。
  • Rolldown:2026 年 1 月达到 1.0 RC。这个 Rust bundler 在 Vite 内部同时替代 esbuild 和 Rollup,比 Rollup 快 10—30 倍。Vite 7 默认使用它。
  • Oxc:格式化工具 Oxfmt 进入 beta,100% 兼容 Prettier,速度是后者的 30 倍Oxlint 已被 Vue.js、Turborepo、Sentry、Hugging Face 使用。
  • Biome v2:首个不依赖 TypeScript 编译器就能做 type-aware linting 的 JS/TS linter。带 GritQL 插件和 monorepo 支持。
  • Rspack:2024 年 8 月达到 1.0,完全兼容 webpack API。已被 TikTok、Discord、Microsoft、Amazon 用于生产环境。
  • Tailwind CSS v4:2025 年 1 月发布,搭载 Oxide 引擎,在计算密集的环节用 Rust,加上 Lightning CSS。完整构建快 5 倍,增量构建快 8 倍。
  • Deno 2.0:2024 年 10 月发布,完全向后兼容 Node.js 和 npm,意味着它基于 Rust 的 formatter、linter 等工具,现在也能服务于主流 Node 项目了。

原文:This pattern has spread to other ecosystems. In Python, uv (a Rust-based package manager, 10-100x faster than pip) and Ruff (linter and formatter replacing Flake8, Black, and isort) have taken off. Rust is eating developer tooling everywhere, not just JavaScript.

这种模式已经扩散到其他生态。在 Python 圈,uv(基于 Rust 的包管理器,比 pip 快 10—100 倍)和 Ruff(替代 Flake8、Black、isort 的 linter + formatter)已经爆发。Rust 在吞噬的不只是 JavaScript,而是各处的开发者工具链。

🟢 译者注:uv 和 Ruff 都是 Astral 出品。Astral 把”用 Rust 改写 Python 工具链”做成了商业模式,被 Python 社区戏称为”Python 的 Vercel”。

原文:In the esbuild section above, Evan You (creator of Vue and Vite) is quoted saying Go “was much more enjoyable to work with” than Rust. In 2025, Evan raised $12.5M and founded VoidZero to build a unified Rust-based JavaScript toolchain. Vite, Vitest, Rolldown, and Oxc are all under this umbrella.

注意上面 esbuild 那一节,原文里被引述说 Go “用起来比 Rust 更愉快”的 Evan ——其实那是 esbuild 作者 Evan Wallace。而 Vue / Vite 作者 Evan You 在 2025 年融资 1250 万美元,创办了 VoidZero,目标是打造一个统一的 Rust 化 JavaScript 工具链。Vite、Vitest、Rolldown、Oxc 都被纳入了这把伞下。

🟢 译者注:Lee 这里把两个 Evan 用了同一个名字”Evan”,中文读者很容易看晕。其实 esbuild 那段引语来自 Evan Wallace(Figma 联创);而 2025 年成立 VoidZero 的是 Evan You(Vue/Vite 作者)。Lee 的修辞用意是:虽然不是同一个人,但”Evan”这个名字代表的是从 esbuild 到 VoidZero 的整条 JS 工具链领袖谱系——这条谱系从 Go 偏好,转向了对 Rust 的全面押注。这是 2025—2026 年 JS 工具链最重要的方向性变化之一。

原文:Rust is also proving to be a great language for AI coding agents to write. I recently built a Rust-based image compressor using only coding agents. It was 38,000 lines of Rust with zero runtime dependencies. Rust’s strict compiler is a natural fit for AI-generated code: if it compiles, it’s much closer to correctness than other languages. Rust has grown significantly in the past 6 months because of coding agents.

Rust 也被证明是一门非常适合 AI coding agent 来写的语言。最近我用 coding agent 单独构建了一个基于 Rust 的图像压缩器,38000 行 Rust,零 runtime 依赖。Rust 严格的编译器对 AI 生成的代码来说是天然的契合:如果它能通过编译,那它已经比其他语言更接近”正确”。因为 coding agent 的存在,Rust 在过去 6 个月里增长得异常显著

🟢 译者注:这一段是这次 2026 更新里最值得反复读的。它点出了一个从 2025 H2 开始才被广泛意识到的现象:Rust 的编译器是 AI 生成代码的”质量门”——AI 在动态语言里编出能跑但有 bug 的代码很容易,但要让 Rust 编译器点头则要难得多,顺带就把许多 AI 容易犯的错挡在了门外。如果你在思考”AI 时代我学什么语言最划算”,这是核心论据之一。

原文:The world I described in 2021, where all JavaScript build tools are written in Rust, has largely arrived.

我 2021 年描述的那个世界——所有 JavaScript 构建工具都用 Rust 写——已经基本到来


脚注

¹:之前这个榜单叫 “most loved”。Rust 自 2016 年起,在 Stack Overflow 开发者调查里每一年都登顶这个分类,到 2025 年正好是连续十届。

²:Deno 2.0 已于 2024 年 10 月发布,完全向后兼容 Node.js 和 npm。

³:Rome 项目 2023 年被废弃,然后被分叉为 Biome,Biome 之后发布了带 type-aware linting 的 v2。

⁴:截至 2026 年这条已经不成立了。几乎每一个主流 JavaScript 构建工具,都有了基于 Rust 的替代品或重写版。

⁵:swcpack 最终没有发布。这块空缺被 RspackTurbopack 填上了。

⁶:Turbopack 在 Next.js 16 中已成为默认打包器,SWC 也接管了转译与压缩——这一愿景已基本兑现。


译者总评

5 个 takeaway,2026 中文前端读者最该带走的:

  1. “Rust 吞噬 JavaScript 工具链”已不是预测,而是事实。Lee 在 2021 年提出的那个”Next.js 的所有构建工具都用 Rust 写”的愿景,在 2026 已经基本兑现。要追前端工具链动态,你的最小阅读单元变成了:Turbopack / Rolldown / Oxc / Biome / Rspack / Lightning CSS / Tailwind Oxide。

  2. VoidZero 是工具链层面的”标准化战争”。Evan You 把 Vite / Vitest / Rolldown / Oxc 收编到 VoidZero,不是简单的工具升级,是”工具碎片化”的破局尝试——目标是替代 webpack/Rollup/Babel/ESLint/Prettier/Jest 七件套。VoidZero 是否成功,会决定 2026—2028 前端工具链格局走向”统一”还是继续”百花齐放”。

  3. Rust + AI agent 是个新的复合趋势。Rust 编译器对 AI 生成代码是天然的”质量门”,这是从 2025 H2 才大规模显现的现象。Lee 自己用 agent 写了 38000 行零依赖 Rust 库,作为存在性证明。这个趋势对中文开发者的实际影响:如果你打算让 AI 写底层工具或服务,Rust 反而比 Python/JS 更友好。

  4. “two Evans” 的反转,是行业基础设施成熟度的拐点信号。2020 年 Evan Wallace 选 Go 的核心理由是”Go 写起来更快乐”,这反映当时 Rust 工具链不够成熟;2025 年 Evan You 押全部身家在 Rust,说明 Rust 工具链(napi-rs / WASM / cargo)已经成熟到可以撑起一个商业公司的全部代码库。

  5. 不要去学 Rust 的所有权语义来给 JS 工具链贡献代码。这是 Lee 文中暗藏但没明说的一层意思:Rust 化工具链对用户几乎完全透明——你不需要懂 Rust 就能用 Vite 7、Next.js 16、Biome v2。这是一个非常重要的”性能升级路径”:用户态零成本拿到 native 速度收益。要不要学 Rust,取决于你想做工具维护者还是工具用户。

🔗 调研来源


📝 配套精读 + 译者点评:VoidZero / Vite+ / Rolldown:Rust 化前端工具链总集篇