<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Babel on Text Matrix</title><link>https://txtmix.com/tags/babel/</link><description>Recent content in Babel on Text Matrix</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Tue, 21 Jul 2026 20:06:14 +0800</lastBuildDate><atom:link href="https://txtmix.com/tags/babel/index.xml" rel="self" type="application/rss+xml"/><item><title>swc-project/swc 架构拆解：Rust 写的 TS/JS 编译器为何能在 33k+ star 仓库里保持单 crate 形态</title><link>https://txtmix.com/posts/tech/swc-rust-typescript-compiler-architecture/</link><pubDate>Sat, 13 Jun 2026 21:03:20 +0800</pubDate><guid>https://txtmix.com/posts/tech/swc-rust-typescript-compiler-architecture/</guid><description>&lt;h1 id="swc-projectswc-架构拆解rust-写的-tsjs-编译器为何能在-34k-star-仓库里保持单-crate-形态">swc-project/swc 架构拆解：Rust 写的 TS/JS 编译器为何能在 34k+ star 仓库里保持单 crate 形态&lt;/h1>
&lt;blockquote>
&lt;p>一句话核心判断：&lt;strong>SWC 是 Rust 写的 TypeScript/JavaScript 编译器，仓库看似只有一个根 crate（&lt;code>swc&lt;/code>），但通过 Cargo workspace 聚合了 parser / codegen / bundler / CSS / 压缩器等几十个子 crate，对外同时暴露 Rust API 和 Node API（&lt;code>@swc/core&lt;/code>）。它比 Babel 快 20–70 倍的核心原因是 Rust + 精心设计的 SIMD 优化，但工程上更值得学习的是&amp;quot;如何在大规模编译器项目里既保持单一发布入口、又不牺牲模块化&amp;quot;&lt;/strong>。&lt;/p></description></item></channel></rss>