ChipTS
Experimental ahead-of-time compiler for TypeScript, built in Rust using the Cranelift code generator. Parses TypeScript source and emits native machine code without a JavaScript runtime. Currently handles a useful subset of the language — the goal is fast compilation of performance-critical TypeScript.
Retrospective
The Good
Cranelift generates machine code fast — way faster than LLVM for our use case. Parsing TypeScript's grammar in Rust forces you to really understand every edge case in the language spec.
The Bad
TypeScript's type system is Turing-complete. Implementing even basic generics correctly is a months-long effort. We're focusing on a useful subset first.
The Ugly
The compiler currently handles maybe 40% of real-world TypeScript. Decorators, complex mapped types, and conditional types are all missing. It compiles hello world blazingly fast though.