跳到正文

正在自动登录…

← 返回项目列表

pingdotgg/ts-rust

类型检查

这是一个用Rust重写的TypeScript编译器,旨在提供与官方tsc兼容但更快的类型检查、语言服务和API。适用于需要高性能类型检查的TypeScript项目,尤其是大型代码库。

AI 中文解读 · 根据仓库描述与 README 生成 · 2026/10/16 23:36:32 · 查看原文

Rust应用与服务
累计 Stars
1,474
当前热度
7~30 天 · 小火
仓库创建时间
打开 GitHub ↗

选用指南

AI 根据 README 整理 · 2026/10/16 23:36:32

使用方式

通过npm安装后使用命令行工具,支持与tsc相同的选项,也可作为语言服务器在VS Code中使用。

查看 README 依据
[typescript-go](https://github.com/microsoft/typescript-go)). It keeps Go's algorithms and behavior and has the same command line (`tsc`), language server and API. ## Install ```sh npm install -D tsc-rs npx tsc-rs -p tsconfig.json ``` `tsc-rs` takes the same options as `tsc`. The npm package is `tsc-rs` so that it does not clash with the `typescript` package. Each [release](https://github.com/pingdotgg/ts-rust/releases) also has a standalone archive per platform: the `tsc` binary with the lib files next to it.
Platforms: Linux x64 and arm64 (static, any distribution), macOS arm64, and (from the first release after 0.2.0) macOS x64, Windows x64 and Windows arm64. To use it in VS Code, see the [npm package README](npm/tsc-rs-readme.md#vs-code). ## Effect diagnostics `tsc-rs` has the [Effect](https://effect.website) language service diagnostics built in (codes 377xxx), so an Effect project needs no second compiler. They come from the same check as the TypeScript diagnostics, and the language server shows them too. They run only when the tsconfig has the plugin, as with `@effect/language-service`:
部署要求

需要Node.js环境以通过npm安装,支持Linux、macOS和Windows的多种架构。

查看 README 依据
[typescript-go](https://github.com/microsoft/typescript-go)). It keeps Go's algorithms and behavior and has the same command line (`tsc`), language server and API. ## Install ```sh npm install -D tsc-rs npx tsc-rs -p tsconfig.json ``` `tsc-rs` takes the same options as `tsc`. The npm package is `tsc-rs` so that it does not clash with the `typescript` package. Each [release](https://github.com/pingdotgg/ts-rust/releases) also has a standalone archive per platform: the `tsc` binary with the lib files next to it.
Platforms: Linux x64 and arm64 (static, any distribution), macOS arm64, and (from the first release after 0.2.0) macOS x64, Windows x64 and Windows arm64. To use it in VS Code, see the [npm package README](npm/tsc-rs-readme.md#vs-code). ## Effect diagnostics `tsc-rs` has the [Effect](https://effect.website) language service diagnostics built in (codes 377xxx), so an Effect project needs no second compiler. They come from the same check as the TypeScript diagnostics, and the language server shows them too. They run only when the tsconfig has the plugin, as with `@effect/language-service`:
已知限制

早期版本,在部分monorepo场景下可能输出额外文件或报告TS6059错误;在tsc -b模式下可能因构建顺序导致读取旧输出;编辑器长时间编辑时内存缓慢增长。

查看 README 依据
The output is not the same. `bun check` gave output identical to `tsc` 7 on 37 of 60 open-source repos, and `tsc-rs` on all 60. `bun check` also reports errors that `tsc` 7 does not, for example TS2749 on T3 Code `apps/server`. These numbers are from our studies of 2026-10-07 and 2026-10-08, with `tsc-rs` 0.1.0 and R179 on Linux. ## Known problems - In some monorepos, the source files of a workspace package are reachable both through `node_modules` and through a direct import. There, `tsc-rs` can write output for more of those
files than `tsc` does, and report TS6059 (file is not under `rootDir`) for them. `tsc` decides this by timing, so its own result changes between runs. `tsc-rs` gives the same result in every run (the result of TypeScript 6). - In `tsc -b`, when one project imports the output of another project without a project reference, the two projects can build at the same time. Then `tsc` reads each output file before or after the other project writes it. This is timing, so the result of `tsc` changes between runs, file by
file. `tsc-rs` makes the programs one at a time and writes the outputs of a project together when that project ends. So it can read old or missing output where `tsc` reads new output, or the reverse. Often the only difference is the file hashes in the reading project's `.tsbuildinfo`. Sometimes it is an error, such as TS2305, TS2307 or TS2322. Add the reference to fix it. - In the editor, memory grows slowly during long edit sessions: 3.1 to 4.6 MiB per 1,000 edits in our 10,000-edit sessions, where `tsc` grows 2.6 to 2.8. It starts within 10% of `tsc`'s, and from

README

正在加载 README…

收录信息

仓库创建时间
2026/10/7 13:17:07
首次达标收录
2026/10/9 12:11:13
统计更新时间
2026/10/22 19:10:50

按创建时长与累计 Stars 判断等级。首次达标收录后,即使未达当前门槛仍保留;累计 Stars 和仓库状态会定期更新。确认只有 README 及辅助文件的仓库会停止公开。

仓库信息

最近推送
2026/10/22 19:05:38
许可证标识
MIT
Fork 数
97
当前状态
未归档

收录记录

按创建时长与累计 Stars 首次收录:小火
首次发现项目