GitHub - pingdotgg/ts-rust: An experimental Rust port of the TypeScript 7 compiler (tsc) · GitHub Skip to content Navigation Menu Sign in Appearance settings Platform AI CODE CREATION GitHub Copilot Write better code with AI GitHub Copilot app Direct agents from issue to merge MCP Registry Integrate external tools DEVELOPER WORKFLOWS Actions Automate any workflow Codespaces Instant dev environments Issues Plan and track work Code Review Manage code changes Code Quality Enforce quality at merge APPLICATION SECURITY GitHub Advanced Security Find and fix vulnerabilities Code security Secure your code as you build Secret protection Stop leaks before they start EXPLORE Why GitHub Documentation Blog Changelog Marketplace View all features Solutions BY COMPANY SIZE Enterprises Small and medium teams Startups Nonprofits BY USE CASE App Modernization DevSecOps DevOps CI/CD View all use cases BY INDUSTRY Healthcare Financial services Manufacturing Government View all industries View all solutions Resources EXPLORE BY TOPIC AI Software Development DevOps Security View all topics EXPLORE BY TYPE Customer stories Events & webinars Ebooks & reports Business insights GitHub Skills SUPPORT & SERVICES Documentation Customer support Community forum Trust center Partners View all resources Open Source COMMUNITY GitHub Sponsors Fund open source developers PROGRAMS Security Lab Maintainer Community GitHub Stars Archive Program REPOSITORIES Topics Trending Collections Enterprise ENTERPRISE SOLUTIONS Enterprise platform AI-powered developer platform AVAILABLE ADD-ONS GitHub Advanced Security Enterprise-grade security features Copilot for Business Enterprise-grade AI features Premium Support Enterprise-grade 24/7 support Pricing Search / Sign in Sign up Appearance settings You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} pingdotgg ts-rust Repository navigation Code Issues 4 ( 4 ) Pull requests 3 ( 3 ) Actions Projects Security and quality Insights More items ts-rust Public Notifications You must be signed in to change notification settings Fork 32 ( 32 ) Star 569 ( 569 ) You must be signed in to star a repository About An experimental Rust port of the TypeScript 7 compiler (tsc) Topics compiler rust tsc typescript Resources Readme MIT license Activity Custom properties Stars 569 stars Watchers 0 watching Forks 32 forks Report repository main Branches Tags Go to file Code Open more actions menu Latest commit History 5,961 Commits 5,961 Commits Folders and files Name Name Last commit message Last commit date .github/ workflows .github/ workflows crates crates docs docs licenses licenses npm npm scripts scripts tools tools .gitattributes .gitattributes .gitignore .gitignore AGENTS.md AGENTS.md Cargo.lock Cargo.lock Cargo.toml Cargo.toml LICENSE LICENSE NOTICE.md NOTICE.md README.md README.md UPSTREAM.json UPSTREAM.json UPSTREAM.md UPSTREAM.md recommendations.md recommendations.md ts-rust-recovery-plan.html ts-rust-recovery-plan.html View all files Repository files navigation README MIT license More items ts-rust (aka tsc-rs) I wanted to see if LLMs could port the TypeScript compiler, checker and lsp to Rust. Turns out they can. It cost over $420,000 in tokens to do it, but you could probably have done it for ~$20k (see below) Motivations Test model capabilities Make a fast TypeScript type checker Make a ts checker that can work in WASM with high performance Memes Warnings This is an early release. It has 100% compatibility in every real world project we have tested. It should work as a drop in replacement for the vast majority of apps. See Known problems . Also worth mentioning: I've never read a line of this code. Install Be warned, I have no idea if this will actually work. npm install -D tsc-rs npx tsc-rs -p tsconfig.json How did this go? I used a lot of OpenAI models to try and complete this port. In total I did over $400,000 in API priced tokens with GPT-5.6 Sol and GPT 6 Astra . They wrote over 1.3m lines of Rust over multiple months of /goal loops and never got past like 84% compat. When I saw how little my Claude Code limits were burning, I figured it'd be fun to throw Opus 5.5 at this. It had a working v0 in 10 hours. I assumed it kept using the code the Codex models wrote. I was wrong. Opus 5.5 started from scratch. It got further than Astra in 1/10th the time. I let it keep going, and it definitely did. Total token spend was ~$24,047 of API spend over 2 weeks . I was using my Claude accounts, and it worked out to somewhere between 925% and 983% of my $200 plan weekly limits . Expensive, for sure, but not that bad considering how much work has went into typescript-go. "The Slop Line" Everything below this was written by my LLMs, not me. What actually is this? ts-rust is a direct port of Microsoft's native TypeScript compiler, which is written in Go ( microsoft/TypeScript , formerly typescript-go ). It keeps Go's algorithms and behavior and has the same command line ( tsc ), language server and API. Install 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 also has a standalone archive per platform: the tsc binary with the lib files next to it. Platforms: Linux x64 (static, any distribution) and macOS arm64. Windows and Linux arm64 are not available yet. To use it in VS Code, see the npm package README . Effect diagnostics tsc-rs has the Effect 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 : { "compilerOptions" : { "plugins" : [{ "name" : "