返回首页
Socket Blog··论文与技术

Cloudflare Introduces a Faster TypeScript Compiler Written in Rust

中文摘要

Cloudflare 正在为其 Oxc 工具链开发 Rust 版 TypeScript 编译器 tsrs,旨在实现更快的类型检查并降低内存占用。

English Summary

Cloudflare is developing a Rust-based TypeScript compiler port, tsrs, for its Oxc toolchain to achieve faster type checking and lower memory usage.

原文节选

Microsoft’s Go port of TypeScript’s compiler and tooling delivered roughly 10× faster type checking. Now Cloudflare is working on a Rust port of TypeScript’s compiler that promises even faster type checking and lower memory use. The TypeScript team is collaborating on the work, and some of the optimizations are already making their way into the official compiler. Cloudflare announced on October 20 that it is bringing tsrs, a Rust port of the TypeScript compiler, into its Oxc toolchain. Its VoidZero team is taking on development and maintenance. The project began with Max Schwenk, head of AI developer experience at Owner.com, a company that makes software for restaurants. Type checking its large TypeScript backend was consuming enough time and memory to make running several coding agents on a laptop impractical. Schwenk used Claude coding agents to build the initial Rust port, then tested and optimized it against the Go compiler before moving the project to Oxc. For VoidZero, which Cloudflare acquired in June, this extends years of work on JavaScript tools written in Rust. Its projects include the Oxc parser and compiler tools, the Rolldown bundler, the Oxlint linter, and the Oxfmt …