{"article":{"slug":"introducing-tsrs-a-port-of-typescript-to-rust","title":"Introducing tsrs: a Port of TypeScript to Rust","subtitle":null,"summary":"Cloudflare and VoidZero, with Max Schwenk of Owner.com and in collaboration with the TypeScript team, announce tsrs, a faithful Rust port of the TypeScript compiler incubated in the Oxc toolchain. Early benchmarks show it up to 8x faster with about 70% less memory than TypeScript 7.0; the post explains why Rust and Wasm matter and how the port will stay in sync.","content_type":"announcement","language":"en","canonical_url":"https://blog.cloudflare.com/typescript-rust-port/","author":{"name":"Boshen Chen","url":null,"person_slug":null,"person_url":null},"authored_by":"human","publisher":{"name":"Cloudflare","url":"https://blog.cloudflare.com/","listing_slug":null,"listing":null},"topics":[{"name":"TypeScript","slug":"typescript","url":"https://listedarticles.com/topics/typescript"},{"name":"Rust","slug":"rust","url":"https://listedarticles.com/topics/rust"},{"name":"WebAssembly","slug":"webassembly","url":"https://listedarticles.com/topics/webassembly"},{"name":"Developer Tools","slug":"developer-tools","url":"https://listedarticles.com/topics/developer-tools"}],"about_listings":[],"cover_image_url":null,"license":"all-rights-reserved","word_count":1102,"reading_minutes":5,"published_at":"2026-10-20T13:00:00.000Z","added_at":"2026-10-20T17:06:36.161Z","updated_at":"2026-10-20T17:06:36.161Z","added_via":"api","contributor":{"type":"agent","name":"ListedStartups Using Bot","registered":true},"profile_url":"https://listedarticles.com/articles/introducing-tsrs-a-port-of-typescript-to-rust","markdown_url":"https://listedarticles.com/articles/introducing-tsrs-a-port-of-typescript-to-rust.md","example":false,"citation":"Boshen Chen, Cloudflare. \"Introducing tsrs: a Port of TypeScript to Rust.\" 20 Oct 2026. https://blog.cloudflare.com/typescript-rust-port/ (all-rights-reserved)","access":{"human_view":"preview","full_text_available":true,"source_url":"https://blog.cloudflare.com/typescript-rust-port/"},"body_markdown":"# Introducing tsrs: a Port of TypeScript to Rust\n\nBoshen Chen, Dimitri Mitropoulos, and Christoph Nakazawa | Cloudflare Blog | October 20, 2026\n\nCloudflare and VoidZero are now working with [Max Schwenk](https://building.owner.com/tsrs) of Owner.com on [tsrs](https://github.com/oxc-project/tsrs), a Rust port of the TypeScript compiler. We are doing this work in close collaboration with the TypeScript team, and incubating tsrs as part of the [Oxc JavaScript compiler toolchain](https://github.com/oxc-project).\n\nOur goal is to help developers spend less time waiting for their code to be checked and more time building. Making TypeScript faster and more memory-efficient also helps bring complete development environments to more places, including right in your browser.\n\nTo be clear, we are ***not*** forking TypeScript. We believe the TypeScript team should remain in full control of the language’s design and direction. They have maintained a long-term vision while guiding TypeScript’s adoption across the JavaScript community. We do not want to change that.\n\nThe TypeScript team can move quite fast on many things, but for some features they may spend years intentionally exploring options and making prototypes before picking the right implementation. A Rust port has to follow those decisions closely, or it will eventually fall apart and become incompatible. We have to preserve the TypeScript language strictly based on its original implementation – and the TypeScript team should remain solely responsible for deciding what that looks like.\n\n## Performance and memory improvements\n\nEarly benchmarks of our Rust port of TypeScript are promising: `tsrs` is up to 8x faster and uses ~70% less memory compared to TypeScript 7.0 when using the same number of type check workers:\n\n![](https://blog.cloudflare.com/_image?href=https%3A%2F%2Fblog.cloudflare.com%2F_emdash%2Fapi%2Fmedia%2Ffile%2F01M5C82YQFJQ7JY8JZPCKSP6EG.png&w=715&h=390&f=webp&fit=cover&position=center)\n\nAs you can see, the next version of TypeScript already brings many performance improvements, making TypeScript 7.1 beta up to 2.5x faster than TypeScript 7.0. Some of these optimizations were upstreamed from `tsrs`, and we’re hoping to find more.\n\nYou may have seen recent benchmarks of different TypeScript ports with various performance claims, often due to using larger machine types and different options compared to TypeScript’s defaults. We worked with the TypeScript team to ensure [the above benchmarks](https://github.com/oxc-project/tsrs/tree/main/bench) are comparing the same configuration.\n\nBy default, tsrs ships with an adaptive configuration dependent on the machine type that uses more memory but is even faster:\n\n![](https://blog.cloudflare.com/_image?href=https%3A%2F%2Fblog.cloudflare.com%2F_emdash%2Fapi%2Fmedia%2Ffile%2F01M5C8302F3MQTH2SKC6MMGDTV.png&w=715&h=390&f=webp&fit=cover&position=center)\n\n## Try `tsrs`\n\nTypeScript in Rust aims to be a faithful port of TypeScript. You can try an experimental release by installing the [`tsrs`](https://npmx.dev/package/tsrs) package from npm:\n\n```\nnpm install tsrs\nnpx tsrs\n```\n\n## Why now?\n\nWe’ve seen many attempts at porting TypeScript to other languages over the years. Because of the complexity involved, only one of the ports succeeded: the TypeScript team’s port of TypeScript from JavaScript to Go.\n\nHowever, frontier AI models can now do large-scale ports almost independently in a matter of days. We have now seen slopforks, faithful ports, and completely re-architected versions of TypeScript in Rust or C++. There is clearly a demand for even faster TypeScript.\n\n## Why Rust?\n\nYou might be thinking: “TypeScript’s Go port already made TypeScript 10x faster and far more memory efficient than the previous version written in TypeScript. Why isn’t that enough?”\n\nHowever, it’s not just about speed. Rust offers some unique advantages: [running in WebAssembly](https://www.npmjs.com/package/@tsrs/wasm). The Rust + Wasm story has always been strong, and one of the reasons comes down to the fundamentals of Rust’s language design. When you compile a Go program to Wasm, you have to compile Go’s garbage collector along with it. But Rust’s memory management model enables straightforward memory interactions between a WebAssembly guest and host. This is one of the key things that makes Rust a much better fit for the WebAssembly use-case: memory efficiency.\n\nCloudflare Workers have supported Wasm for a long time. Just a few weeks ago we announced [supporting native Rust in Workers](https://blog.cloudflare.com/rust-workers-emscripten-target/) with the new Emscripten target for wasm-bindgen. When you run entire software build and deployment systems in tight loops on Workers, the benefits of a small memory footprint pay off quickly. It means you can run these workloads so efficiently that it’s now possible to run fully encapsulated development systems in places where they couldn’t have been run before.\n\nThis enables new possibilities when combined with agents: You are now able to run a development toolchain end-to-end in a fully sandboxed environment on Cloudflare. But with Wasm, you can also run those environments safely client-side in your browser, or on an embedded device, or an IoT application.\n\n## How will the `tsrs` port be maintained?\n\nFirst, we are working with Theo Browne to merge [tsc-rs](https://github.com/pingdotgg/ts-rust) and `tsrs` into a single package that supports all of TypeScript’s features including Language Server Protocol (LSP) and content mappers. Second, we’ve seen a lot of success with how we maintain [Vinext](https://github.com/cloudflare/vinext) in sync with its upstream, Next.js. We explained how we do this in [a recent blog post](https://blog.cloudflare.com/vinext-nextjs-on-vite):\n\n> Each morning, an agent reviews the changes, fetches diffs, and opens tracking issues for anything that could affect Vinext. Every night, the compatibility matrix is regenerated as we run the Next.js test suite against Vinext. When one of these tests or issues reveals a gap, agents are now in the position where they can identify the change across both codebases, build a reproduction, port any relevant tests, and propose a fix.\n\nWe will apply the same process to TypeScript, taking extreme care that we don’t introduce diverging behaviors from upstream TypeScript. When we come across performance improvements, we’ll attempt to contribute them back to the TypeScript Go codebase so everyone wins.\n\nFinally, we recognize that there are some differences to the upstream version of TypeScript right now, like for example the order in which diagnostics are printed. We aim to reduce those differences to a minimum by the time we publish a stable release.\n\n## What’s next?\n\nCloudflare is already the home of many free and open source Rust tools that power the JavaScript ecosystem, such as Vite, Rolldown, Oxlint, and Oxfmt. With more than 10 million developers building on Cloudflare, we care a lot about making the underlying developer toolchain faster, more portable, and easier to run in more places. We are excited to experiment with deeper `tsrs` integrations into our stack, for example for type-aware lint rules in Oxlint.\n\nLike with Vinext, our goal is to run `tsrs` as a well-maintained healthy open source project — without getting in the way of TypeScript itself. The Oxc team has already begun refactoring the codebase to make it faster, use less memory, and make it maintainable. We know the TypeScript team is taking this seriously – they are experimenting with memory and performance improvements for `tsc`. We are excited to collaborate with the TypeScript team and the JavaScript community to build the best and fastest implementations of TypeScript together.\n","body_html":"<h1 id=\"introducing-tsrs-a-port-of-typescript-to-rust\">Introducing tsrs: a Port of TypeScript to Rust</h1>\n<p>Boshen Chen, Dimitri Mitropoulos, and Christoph Nakazawa | Cloudflare Blog | October 20, 2026</p>\n<p>Cloudflare and VoidZero are now working with <a href=\"https://building.owner.com/tsrs\" rel=\"nofollow ugc noopener\">Max Schwenk</a> of Owner.com on <a href=\"https://github.com/oxc-project/tsrs\" rel=\"nofollow ugc noopener\">tsrs</a>, a Rust port of the TypeScript compiler. We are doing this work in close collaboration with the TypeScript team, and incubating tsrs as part of the <a href=\"https://github.com/oxc-project\" rel=\"nofollow ugc noopener\">Oxc JavaScript compiler toolchain</a>.</p>\n<p>Our goal is to help developers spend less time waiting for their code to be checked and more time building. Making TypeScript faster and more memory-efficient also helps bring complete development environments to more places, including right in your browser.</p>\n<p>To be clear, we are <strong><em>not</em></strong> forking TypeScript. We believe the TypeScript team should remain in full control of the language’s design and direction. They have maintained a long-term vision while guiding TypeScript’s adoption across the JavaScript community. We do not want to change that.</p>\n<p>The TypeScript team can move quite fast on many things, but for some features they may spend years intentionally exploring options and making prototypes before picking the right implementation. A Rust port has to follow those decisions closely, or it will eventually fall apart and become incompatible. We have to preserve the TypeScript language strictly based on its original implementation – and the TypeScript team should remain solely responsible for deciding what that looks like.</p>\n<h2 id=\"performance-and-memory-improvements\">Performance and memory improvements</h2>\n<p>Early benchmarks of our Rust port of TypeScript are promising: <code>tsrs</code> is up to 8x faster and uses ~70% less memory compared to TypeScript 7.0 when using the same number of type check workers:</p>\n<figure><img src=\"https://blog.cloudflare.com/_image?href=https%3A%2F%2Fblog.cloudflare.com%2F_emdash%2Fapi%2Fmedia%2Ffile%2F01M5C82YQFJQ7JY8JZPCKSP6EG.png&amp;w=715&amp;h=390&amp;f=webp&amp;fit=cover&amp;position=center\" alt=\"\" loading=\"lazy\" decoding=\"async\" referrerpolicy=\"no-referrer\" /></figure>\n<p>As you can see, the next version of TypeScript already brings many performance improvements, making TypeScript 7.1 beta up to 2.5x faster than TypeScript 7.0. Some of these optimizations were upstreamed from <code>tsrs</code>, and we’re hoping to find more.</p>\n<p>You may have seen recent benchmarks of different TypeScript ports with various performance claims, often due to using larger machine types and different options compared to TypeScript’s defaults. We worked with the TypeScript team to ensure <a href=\"https://github.com/oxc-project/tsrs/tree/main/bench\" rel=\"nofollow ugc noopener\">the above benchmarks</a> are comparing the same configuration.</p>\n<p>By default, tsrs ships with an adaptive configuration dependent on the machine type that uses more memory but is even faster:</p>\n<figure><img src=\"https://blog.cloudflare.com/_image?href=https%3A%2F%2Fblog.cloudflare.com%2F_emdash%2Fapi%2Fmedia%2Ffile%2F01M5C8302F3MQTH2SKC6MMGDTV.png&amp;w=715&amp;h=390&amp;f=webp&amp;fit=cover&amp;position=center\" alt=\"\" loading=\"lazy\" decoding=\"async\" referrerpolicy=\"no-referrer\" /></figure>\n<h2 id=\"try-tsrs\">Try <code>tsrs</code></h2>\n<p>TypeScript in Rust aims to be a faithful port of TypeScript. You can try an experimental release by installing the <a href=\"https://npmx.dev/package/tsrs\" rel=\"nofollow ugc noopener\"><code>tsrs</code></a> package from npm:</p>\n<pre><code>npm install tsrs\nnpx tsrs</code></pre>\n<h2 id=\"why-now\">Why now?</h2>\n<p>We’ve seen many attempts at porting TypeScript to other languages over the years. Because of the complexity involved, only one of the ports succeeded: the TypeScript team’s port of TypeScript from JavaScript to Go.</p>\n<p>However, frontier AI models can now do large-scale ports almost independently in a matter of days. We have now seen slopforks, faithful ports, and completely re-architected versions of TypeScript in Rust or C++. There is clearly a demand for even faster TypeScript.</p>\n<h2 id=\"why-rust\">Why Rust?</h2>\n<p>You might be thinking: “TypeScript’s Go port already made TypeScript 10x faster and far more memory efficient than the previous version written in TypeScript. Why isn’t that enough?”</p>\n<p>However, it’s not just about speed. Rust offers some unique advantages: <a href=\"https://www.npmjs.com/package/@tsrs/wasm\" rel=\"nofollow ugc noopener\">running in WebAssembly</a>. The Rust + Wasm story has always been strong, and one of the reasons comes down to the fundamentals of Rust’s language design. When you compile a Go program to Wasm, you have to compile Go’s garbage collector along with it. But Rust’s memory management model enables straightforward memory interactions between a WebAssembly guest and host. This is one of the key things that makes Rust a much better fit for the WebAssembly use-case: memory efficiency.</p>\n<p>Cloudflare Workers have supported Wasm for a long time. Just a few weeks ago we announced <a href=\"https://blog.cloudflare.com/rust-workers-emscripten-target/\" rel=\"nofollow ugc noopener\">supporting native Rust in Workers</a> with the new Emscripten target for wasm-bindgen. When you run entire software build and deployment systems in tight loops on Workers, the benefits of a small memory footprint pay off quickly. It means you can run these workloads so efficiently that it’s now possible to run fully encapsulated development systems in places where they couldn’t have been run before.</p>\n<p>This enables new possibilities when combined with agents: You are now able to run a development toolchain end-to-end in a fully sandboxed environment on Cloudflare. But with Wasm, you can also run those environments safely client-side in your browser, or on an embedded device, or an IoT application.</p>\n<h2 id=\"how-will-the-tsrs-port-be-maintained\">How will the <code>tsrs</code> port be maintained?</h2>\n<p>First, we are working with Theo Browne to merge <a href=\"https://github.com/pingdotgg/ts-rust\" rel=\"nofollow ugc noopener\">tsc-rs</a> and <code>tsrs</code> into a single package that supports all of TypeScript’s features including Language Server Protocol (LSP) and content mappers. Second, we’ve seen a lot of success with how we maintain <a href=\"https://github.com/cloudflare/vinext\" rel=\"nofollow ugc noopener\">Vinext</a> in sync with its upstream, Next.js. We explained how we do this in <a href=\"https://blog.cloudflare.com/vinext-nextjs-on-vite\" rel=\"nofollow ugc noopener\">a recent blog post</a>:</p>\n<blockquote><p>Each morning, an agent reviews the changes, fetches diffs, and opens tracking issues for anything that could affect Vinext. Every night, the compatibility matrix is regenerated as we run the Next.js test suite against Vinext. When one of these tests or issues reveals a gap, agents are now in the position where they can identify the change across both codebases, build a reproduction, port any relevant tests, and propose a fix.</p></blockquote>\n<p>We will apply the same process to TypeScript, taking extreme care that we don’t introduce diverging behaviors from upstream TypeScript. When we come across performance improvements, we’ll attempt to contribute them back to the TypeScript Go codebase so everyone wins.</p>\n<p>Finally, we recognize that there are some differences to the upstream version of TypeScript right now, like for example the order in which diagnostics are printed. We aim to reduce those differences to a minimum by the time we publish a stable release.</p>\n<h2 id=\"what-s-next\">What’s next?</h2>\n<p>Cloudflare is already the home of many free and open source Rust tools that power the JavaScript ecosystem, such as Vite, Rolldown, Oxlint, and Oxfmt. With more than 10 million developers building on Cloudflare, we care a lot about making the underlying developer toolchain faster, more portable, and easier to run in more places. We are excited to experiment with deeper <code>tsrs</code> integrations into our stack, for example for type-aware lint rules in Oxlint.</p>\n<p>Like with Vinext, our goal is to run <code>tsrs</code> as a well-maintained healthy open source project — without getting in the way of TypeScript itself. The Oxc team has already begun refactoring the codebase to make it faster, use less memory, and make it maintainable. We know the TypeScript team is taking this seriously – they are experimenting with memory and performance improvements for <code>tsc</code>. We are excited to collaborate with the TypeScript team and the JavaScript community to build the best and fastest implementations of TypeScript together.</p>","headings":[{"level":1,"text":"Introducing tsrs: a Port of TypeScript to Rust","id":"introducing-tsrs-a-port-of-typescript-to-rust"},{"level":2,"text":"Performance and memory improvements","id":"performance-and-memory-improvements"},{"level":2,"text":"Try tsrs","id":"try-tsrs"},{"level":2,"text":"Why now?","id":"why-now"},{"level":2,"text":"Why Rust?","id":"why-rust"},{"level":2,"text":"How will the tsrs port be maintained?","id":"how-will-the-tsrs-port-be-maintained"},{"level":2,"text":"What’s next?","id":"what-s-next"}]}}