开发者利用大语言模型成功将TypeScript编译器移植到Rust,新项目名为tsc-rs1。该移植工作主要采用Claude Opus 5.5完成,在2周内花费约24,047美元,并实现了与原版本100%的兼容性1。tsc-rs相比TypeScript 7的性能提升1.61倍(几何平均),在部分场景下接近bun check的2.95倍性能优势1。
项目的测试验证工作已全部完成——所有181,711个从Go版本移植的测试通过,并在120个开源仓库中验证了命令行输出与原Go版本的一致性1。tsc-rs已作为npm包发布,目前支持macOS arm64和Linux x64(静态链接)两个平台,暂不支持Windows和Linux arm641。移植基于TypeScript版本673a5f17d713(对应TypeScript 7.1.0-dev)1,采用MIT许可证,并保留了TypeScript的Apache-2.0许可证和Go标准库的BSD-3-Clause许可证1。
整个移植过程中,开发者使用了OpenAI和Anthropic的模型,总花费超过420,000美元1。Claude Opus 5.5仅在10小时内就完成了首个可工作版本1。
A developer has successfully ported the TypeScript compiler to Rust using large language models, creating a project called tsc-rs that demonstrates significant performance improvements over the original implementation 1. The porting effort leveraged Claude Opus 5.5 from Anthropic, which produced a fully functional initial version in just 10 hours, with the complete project reaching completion in two weeks at a cost of approximately $24,047 1. All 181,711 migrated tests from the original Go version passed successfully, and command-line output remained consistent with the Go version across 120 open source repositories 1.
The tsc-rs implementation exhibits performance gains of 1.61 times faster than TypeScript 7 on average (geometric mean), with certain scenarios approaching the 2.95x speedup achieved by bun check 1. The project has been published as an npm package under the name tsc-rs to avoid conflicts with the existing typescript package, and currently supports macOS arm64 and Linux x64 static builds, though Windows and Linux arm64 support remain unavailable 1. The port is based on TypeScript version 673a5f17d713 from September 29, 2026 (TypeScript 7.1.0-dev) and carries MIT licensing while preserving the original Apache-2.0 license for TypeScript and BSD-3-Clause license for the Go standard library 1.
评论
还没有评论,欢迎留下第一条。