# Angular Compiler Beta Introduces Rust-Based Preprocessor for TypeScript 7

The new Angular Preprocessor optimizes build performance by decoupling compilation from TypeScript APIs.

- **Source:** [InfoQ](https://brifing.si/source/68ac18af-a4f3-4f7c-9c2c-44d4af8f89dd)
- **Published:** 2026-11-11
- **Topic:** [technology](https://brifing.si/c/technology)
- **Original article:** <https://www.infoq.com/news/2026/11/angular-compiler-rust-typescript/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global>
- **On Brifing:** https://brifing.si/s/63f0d3ee-de8d-4e8a-a589-65d3dade07f0

## Compiler Architecture Shift

The Angular team introduced the Angular Preprocessor, a new toolchain component designed to facilitate TypeScript 7 adoption. This shift addresses the removal of the ts.Transformer API in TypeScript 7.0. By decoupling compilation from standard TypeScript APIs, the team aims to maintain framework compatibility while modernizing the underlying build infrastructure for developers.

## Leveraging Rust and Oxc

The new architecture utilizes Oxc, a high-performance Rust toolchain already powering Vite, to handle the analysis stage. This approach replaces the previous Go-based port, which lacked necessary cross-language equivalents. By rewriting the analysis phase in Rust, the team enables parallel file processing to discover Angular declarations and resolve metadata more efficiently.

## Three-Stage Compilation Process

The ngp compiler operates in three distinct stages. First, the Rust frontend analyzes files to identify metadata. Second, the template compiler emits runtime files and type-checking blocks. Finally, downstream tools like Rolldown or esbuild handle independent type-checking and JavaScript emission, creating a modular pipeline that separates analysis from final code generation.

## Significant Performance Gains

Benchmarking by Cédric Exbrayat revealed substantial improvements during cold builds. Projects ranging from 15 to 1,714 components experienced a 2x to 3x speedup. Furthermore, memory usage on the largest projects dropped significantly, falling from 2.8 GB to 1.4 GB, demonstrating the efficiency of the new Rust-based analysis frontend compared to previous methods.

## On-Demand Compilation Prototyping

Christopher Holder developed a prototype vite-plugin-ngp to test on-demand compilation. On a 252-component codebase, the dev server reached the first page in 10.5 seconds, compared to 17.4 seconds with standard tools. Template edits applied in 112 milliseconds, a massive reduction from the 2.6-second full reload time previously required for such updates.

## Collaboration and Official Path

The Angular team confirmed that the experimental Oxc Angular compiler, previously covered in April, directly influenced this new architecture. Both groups have been collaborating, with the official Angular team now adopting ngp as the standard path forward. This consolidation ensures that community-driven research is integrated into the framework's core development roadmap.

## Implementation and Compatibility

Teams currently using earlier versions of Angular must update to version 20 or later before considering this transition. The ngp compiler is expected to arrive in a minor release of Angular 22, pending the restoration of specific compiler APIs in TypeScript 7.1. Production builds should remain on the existing ngc compiler.

## Future Outlook for Angular

This transition marks a critical evolution for Angular, Google's TypeScript-first web framework. By moving toward Rust-based tooling, the team is positioning the framework to handle larger enterprise applications with greater speed and lower memory overhead. Developers should monitor upcoming minor releases for stable integration of these performance-enhancing compiler updates.

## Sources covering this story

- https://www.infoq.com/news/2026/11/angular-compiler-rust-typescript/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global — 

---

_Summary written by Brifing from the original reporting. Copyright in the original article belongs to its publisher; read the full piece at the link above._
