Video summary

You can rewrite typescript in rust for $420k

Main summary

Key takeaways

Technology

Summary

Theo introduces TSC-RS (TypeScript Rust), an experimental Rust rewrite of the TypeScript compiler, type checker, and language server. He says AI agents built it over several months, with the successful effort taking about two weeks using Claude Opus.

Theo says he did not review the code line by line. Instead, he set goals, monitored failures, and improved the machines and workflows so agents could work in parallel.

What it does and how it compares

Translating TypeScript syntax into JavaScript is relatively straightforward. Type checking is the difficult, computationally expensive part, because TypeScript’s type system must model JavaScript’s many behaviors and edge cases.

Theo reports that TSC-RS is:

  • About 12.5× faster than TypeScript 6 in one comparison.
  • Roughly 2× faster than Microsoft’s Go-based TypeScript 7 implementation, or TSGO, in many tests.
  • More than 13× faster than TypeScript 6 on several projects.

He says it works on projects including T3 Code, tRPC, Sentry, Excalidraw, and Effect. He also incorporated Effect-related type checking directly.

Theo argues that TSC-RS aims for closer compatibility than Bun’s checker, which he says can produce incorrect errors on some larger projects. Nevertheless, he recommends Bun for many projects because he expects it to be more actively maintained.

He describes TSC-RS as a largely drop-in replacement for TSGO and the earlier TypeScript compiler, while noting that some reported issues were inherited TypeScript bugs rather than new regressions.

The video’s headline figures—$400,000 or $420,000—refer to earlier, unsuccessful model usage and the project’s framing. Theo says the successful Opus effort represented about $20,000–$24,000 at full API prices, but roughly $500 in estimated subscription usage under his access arrangements. He stresses that the Rust rewrite was made possible by porting Microsoft’s Go implementation, not by directly translating TypeScript from JavaScript into Rust.

Why Go first, and Rust afterward

Theo explains why Go made sense for Microsoft’s rewrite: its concurrency support can make use of multiple cores, and garbage collection matters less for a compiler running for seconds or minutes than for a service with strict per-request latency targets.

Rust, he says, is especially useful for his separate goal of producing a compact, efficient WebAssembly build. He describes the AI port as initially slower than Go, then improved through continued performance-focused iteration.

The larger idea: development inside a V8 isolate

Theo says his main motivation was not simply faster type checking. He wants to enable a full TypeScript development loop—an agent, code editing, compilation, and testing—to run inside a V8 isolate, rather than requiring a conventional virtual machine.

  • Traditional VMs or containers provide a full operating-system environment but use more memory and reserved compute.
  • Platforms such as Cloudflare Workers run JavaScript in lightweight V8 isolates, which Theo presents as more resource-efficient. However, isolates ordinarily lack normal filesystem access and cannot run native programs.
  • Inspired by Just Bash, which gives agents a simulated Bash environment, Theo demonstrates an app-building setup that keeps its work in memory inside an isolate.
  • In his demo, the agent, app, and development tools together use under 260 MB of RAM, with reported CPU usage peaking around 4%. He says the demo could potentially run in a browser or Cloudflare Worker, though the version shown runs in Node.
  • He argues that Rust-to-WASM is a better fit for this approach than Go-to-WASM, and that a lightweight toolchain could help make agent-driven development cheaper as model inference costs fall.

These are Theo’s stated results and projections; the video does not provide independent verification of the benchmarks or deployment claims.

Development process and practical guidance

Theo says the key to the successful AI-assisted port was less about elaborate prompts and more about engineering the working environment. This included auditing blockers, improving parallel workflows, preventing agents from interfering with one another, adding machines when resources ran short, and setting measurable targets for compatibility and speed.

He also mentions a paid course for employed developers focused on using AI in real software work, with other instructors and a live workshop. He says job-seeking advice will remain free on his channel.

Sponsor mention

The video includes a sponsor segment for Qdrant, a vector-search and retrieval system. Theo contrasts semantic search results with keyword search, showing examples involving video archives, GitHub issues and pull requests, and thumbnail images. He says Qdrant is open source and can be self-hosted or used in the cloud.

Reviews, guides, or tutorials

  • Demonstrations: TSC-RS performance and compatibility comparisons, plus an in-memory app-building demo intended to illustrate development inside a V8 isolate.
  • Process walkthrough: Theo shares examples of the goals and workflow instructions used with agents, and explains how he adjusted the environment to support parallel work.
  • No step-by-step tutorial or independent review is presented.

Main speaker/source: Theo, the video’s host, with brief audience-chat responses and references to Microsoft’s TypeScript team, Bun, and other developers or projects.

Rate this summary

Your feedback will help improve summaries.

Improve this summary

Reprocess with a stronger model when the summary feels incomplete or inaccurate.

Pro

Translate summary in another language

Pro

Ask questions to this video

Chat for follow-up questions, clarifications, and source-backed answers.

Coming soon

Share this summary

Original video