Build1 publisherNot yet confirmed elsewhere3 min readPublished
Theo Browne's AI-written tsc-rs type-checks VS Code 13x faster than tsc 6
Theo Browne's AI-written Rust port of the TypeScript compiler type-checks VS Code 13x faster than tsc 6 and cost over $420,000 in tokens. Browne says he never read the code, so the 181,711 ported tests it passes are the main evidence that it behaves correctly.
The Engineer · Build desk
Drafted by a language model from the sources cited here and checked against its claim ledger before publication. How we use AISend a correction
What happened
- Switching to Opus produced a working v0 in 10 hours on a new crate, written from scratch after the model judged the old code unrecoverable.
- Bun's new bun check, also written in Rust, type-checks VS Code in 1.62s, which the post puts at 33.7x faster than tsc 6.
- Browne said bun check is likely the better choice for most apps, and that tsc-rs is tuned for heavy Effect-style functional types.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
- decision A team already headed to TypeScript 7 is weighing a gain of about 2x from tsc-rs, because the 13x figure is measured against the older tsc 6.
- constraint Outside Effect-heavy codebases that need diagnostics in a single pass, bun check is faster, so the case for adopting tsc-rs shrinks to that niche.
- exposure Adopters run a type checker its author never read, so any behavior outside the ported Go test cases has been neither reviewed nor tested.
- cost About 94% of the token spend bought code that was discarded, so on this evidence model choice set the price of the port more than agent hours did.
"I've never read a line of this code," Browne wrote in the README, according to the dev.to post that covered the release [1]. The port keeps tsc's command line, language server and API, and it installs from npm as tsc-rs [2]. Much of the reaction was about whether anyone can review it, the post's author wrote [18]. Without a reviewer, correctness depends on 181,711 tests ported from Microsoft's Go compiler. All of them pass [6].
I think a compiler is close to the best case for unread code. There is a reference implementation, and any disagreement with it shows up as a failing test. The suite covers the cases its authors wrote down. Inputs outside those cases have no test, and Browne has not read the code that handles them.
The README marks where Browne's authorship ends. He drew what he calls "the slop line" and labelled everything below it as written by his LLMs [11]. The repository also still holds the 1.3 million lines from the first attempt. The Opus run judged that code unrecoverable and left it untouched [9].
The 13x is VS Code checked in 4.20s against 54.56s for tsc 6 [5]. The ratio is 13.0x [20]. tsc 6 is the original compiler, and Microsoft's Go port ships as TypeScript 7 [17]. Against the Go compiler, tsc-rs type-checks in about half the time across 60 projects [7]. That is a gain of about 2x [21]. A team already moving to TypeScript 7 should expect the 2x, not the 13x. The post does not give the hardware or run counts behind any of these timings.
Bun's new bun check, a Rust type checker built into the runtime, checks VS Code in 1.62s [12] [13]. On that codebase tsc-rs is 2.6x slower [22]. On T3 Code without Effect diagnostics, bun check finishes in 4.07s against 7.25s for tsc-rs [14]. tsc-rs comes out ahead only when Effect diagnostics run in the same pass, because bun check does not produce them [15]. Browne published the comparisons he loses. He said bun check is likely the better choice for most apps, and that tsc-rs is tuned for heavy functional types in the Effect style [16]. He then joked that he should drop ts-rust [16].
The token bill covers two runs. About $400,000 went to five months of OpenAI models running in /goal loops. That run produced over 1.3 million lines of Rust and stalled near 84% compatibility [8]. Opus then started a new crate and had a working v0 in 10 hours [9]. The final run cost about $24,000 over two weeks [10]. The two add up to about $424,000, which matches the reported total of over $420,000 [23]. About 94% of the money paid for code that was thrown away [24]. Browne's estimate that $20k would have been enough [4] is close to the cost of the second run alone.
According to the post, the TypeScript lead developer gave a reason for choosing Go: its memory model maps cleanly onto the original codebase, while a Rust port would have needed a ground-up redesign [19]. The agent run that worked was the one that threw out the earlier code and wrote a new crate from scratch [9].
What to watch
- Independent runs of the VS Code and 60-project timings on stated hardware, against both tsc 6 and the Go-based TypeScript 7.
- Whether bun check adds Effect diagnostics, which would remove the one workload where tsc-rs comes out ahead.
- Any human review, fuzzing or differential testing of tsc-rs beyond the 181,711 ported Go tests.