Perry Compiles TypeScript directly to executables using SWC and LLVM
0x1997
35 points
18 comments
May 30, 2026
Related Discussions
Found 5 related stories in 99.3ms across 8,861 title embeddings via pgvector HNSW
- tsz: high performance TypeScript checker, emitter, and language service in Rust bpierre · 12 pts · May 27, 2026 · 51% similar
- We rewrote our Rust WASM parser in TypeScript and it got faster zahlekhan · 155 pts · March 20, 2026 · 51% similar
- Retrofitting JIT Compilers into C Interpreters ltratt · 65 pts · April 15, 2026 · 49% similar
- TypeScript 6.0 DanRosenwasser · 40 pts · March 23, 2026 · 47% similar
- Writing a C Compiler, in Zig (2025) tosh · 150 pts · April 23, 2026 · 46% similar
Discussion Highlights (8 comments)
0x1997
https://github.com/PerryTS/perry
evil_buzzard
the claim of "no runtime" is a bit dubious... you're telling me that you're statically linking a full, modern UI library into every app?
afavour
Fascinating. I've written cross platform (WASM, iOS, Android) libraries with Rust before and had a good time but Rust can be a pain too. Cross-platform Typescript is a really interesting proposition. That said, the more I think about it the more dubious I am. The site boasts no runtime dependencies but clearly it’s going to need things like a garbage collector, you can’t just magic that requirement away. At a certain point is it just doing what a JS engine’s JIT compilation does… except ahead of time? Also doesn't inspire confidence that the text on the site is very clearly AI generated and the GitHub log shows an endless stream of AI powered commits. About 15 per hour, every hour? Doesn’t scream stability.
koteelok
Calling a couple million lines of ai written Rust "stable software" is a bold statement
__s
Curious where on spectrum compiling to wasm falls between art project & optimization potential. Should be able to make some nice interfaces between TS-wasm & TS-web
madanparas
Perry uses NaN-boxing to preserve TypeScript's dynamic type system at runtime, the same approach as JavaScriptCore. The PERF_ROADMAP is honest about the cost: 1.86x behind Zig on image convolution, with 1.24 billion wasted instructions traced specifically to NaN-box unboxing. You cannot get C-level performance without dropping TypeScript semantics, and dropping them means you are no longer compiling TypeScript.
smasher164
I'm not against AI usage but the website, documentation, and even the comments the creator (proggeramlug) makes in response to questions are all very clearly AI-generated. Also, as someone else noticed, the pacing of the commits is eerily fast. That combined with the level of functionality makes me dubious how much accountability the creators have over the implementation. Like you really built a backend that lowers to LLVM, integrated it with a generational gc, wrote a cross-platform reactive runtime, and built support for eleven different targets within like a year? Are you just prompting the model to tack on the next coolest thing or do you understand how these features work? I worry how many of these kinds of projects will show up now. How do you guarantee stability? If there's a memory corruption error in the GC implementation, who's going to debug it?
fooker
Why go through LLVM at all? There are a bunch of tools that JIT somewhat optimized assembly.