For years, Angular's compiler has been built on TypeScript's compiler APIs. TypeScript 7 broke that foundation: its new Go-based implementation doesn't expose the JavaScript transformation API Angular depends on.
Angular's answer is a more fundamental change: decoupling Angular compilation from TypeScript's compiler pipeline.
The new compiler, ngp (Angular Preprocessor), uses Oxc and Rust for source analysis while keeping Angular's existing template compiler in TypeScript. Oxc doesn't compile templates, doesn't generate ɵcmp, and doesn't type-check template expressions.
So what exactly does it do?
I've spent a lot of time with ts-morph, the TypeScript compiler API, and AST transformations, so the Rust rewrite wasn't what caught my attention. What interested me was how Angular could stop depending on TypeScript's AST without rewriting its entire compiler. Let's follow a component through the new architecture and see where each tool takes responsibility.
The problem: Angular depends on TypeScript internals
Angular's existing compiler, ngc, is built directly on top of a TypeScript program. Simplified:
Angular source files | v TypeScript Program | v Angular analysis - Discover decorators - Resolve component metadata - Resolve dependencies - Analyze templates | v Angular template compilation | v TypeScript emit + Angular transformers | v JavaScript The last step is the critical one. During emit, Angular plugs custom transformers into TypeScript's pipeline. For the classes Angular has already analyzed (those decorated with @Component, @Directive, @Pipe and friends), they replace the decorators with the static definitions Ivy needs at runtime.
This:
@Component({ selector: 'app-user', template: '<p>Hello {{ name }}</p>', }) export class User { name = 'Ada'; } eventually becomes a class with a static User.ɵcmp definition that tells the runtime how to create and update the component's view.
If you've written a ts.TransformerFactory yourself, you know how tightly that couples you to the compiler. Your code receives TypeScript's node objects, builds new nodes with TypeScript's factory, and runs inside TypeScript's emit. Angular's compiler is built that way at scale.
TypeScript 7's Go-based compiler doesn't provide the old JavaScript ts.Transformer API. TypeScript 7.1 introduces a new programmatic API, but that doesn't let Angular keep its architecture unchanged. As InfoQ notes, with a Go-based compiler, crossing the JavaScript/Go boundary for every file would be prohibitively expensive.
So the interesting decision isn't replacing TypeScript with Oxc. It's removing TypeScript from the center of Angular's code generation.
What Oxc actually provides
Oxc is a Rust-based JavaScript and TypeScript toolchain developed by VoidZero. It provides parsing, AST visiting, semantic analysis, and source transformation, which is exactly the infrastructure a compiler frontend needs.
But there's a line between understanding TypeScript and understanding Angular.
A parser looking at our component sees a class named User, a decorator, a call expression named Component, an object literal with selector and template, and a property named name. That's structure.
Structure alone isn't enough, though. Consider:
import { Component as Cmp } from '@angular/core'; @Cmp({ selector: 'app-user', template: '...' }) export class User {} Matching the text Component would miss this component entirely. Text matching would also wrongly treat a local function named Component as Angular's decorator. Getting it right requires semantic information: what does the identifier Cmp bind to, and where does that binding come from? Oxc's semantic analysis answers that question.
Deciding that this symbol is Angular's component decorator, interpreting its metadata, and relating the class to other Angular declarations is Angular's job, not Oxc's.
That's the boundary ngp introduces. A general-purpose parser shouldn't need to know what an Angular component is, and Angular shouldn't need its own TypeScript parser just to find its declarations.
Inside ngp: two stages, then downstream tools
The new architecture splits compilation into two stages inside ngp, followed by downstream tools that ngp doesn't own:
Angular source files | v +----------------------------+ | Stage 1: Rust frontend | | | | Oxc parsing + semantics | | Angular's ng-analyze | | | | Output: compilation tasks | +----------------------------+ | v +----------------------------+ | Stage 2: TS backend | | | | Angular template compiler | | Runtime code generation | | Template type-check blocks | +----------------------------+ | +-------+-------+ | | v v foo.ng.ts foo.ngtypecheck.ts | | v v JS emission Type checker | | v v Runtime code Diagnostics Note what hasn't changed: Angular's template compiler is still the existing TypeScript implementation. Rust handles analysis; TypeScript handles Angular-specific code generation. This is a hybrid architecture, not a full Rust compiler.
Stage 1: Rust and Oxc analyze the application
Angular's Rust frontend is called ng-analyze. Oxc reads the TypeScript files and provides the AST and semantic model. Angular's own logic then discovers declarations, interprets metadata, resolves relationships, and builds compilation tasks.
Much of that work goes beyond any single file. Angular has to know which directives and pipes are visible to each component, how NgModule scopes fit together in applications that still use them, and what compiled Angular libraries export. Those are framework concerns, not parsing concerns.
The analyzer processes files in parallel and streams tasks to the backend, so source analysis is no longer organized around a single TypeScript compiler process running in JavaScript.
The Rust code is packaged with napi-rs, with native binaries and a WebAssembly fallback. The WebAssembly fallback is interesting for browser-based development tools.
The implementation lives in packages/compiler-cli/preprocessor. Its README describes the combination of Rust AST analysis using Oxc with a TypeScript coordination layer for type checking.
Stage 2: The TypeScript backend compiles templates
The Rust analyzer doesn't generate Ivy instructions. It hands compilation tasks to a TypeScript backend, which uses Angular's existing template compiler to produce runtime definitions and type-checking code.
A good entry point is compileComponentFromMetadata. It shows that Angular doesn't translate template text straight into JavaScript. The template is parsed into Angular's own template AST, converted into an intermediate representation (IR), transformed in several passes, and only then turned into code.
That's why swapping the TypeScript parser for Oxc doesn't turn the template compiler into Rust. The TypeScript AST and Angular's template IR solve different problems. Oxc handles the source language; the template compiler handles Angular's rendering semantics.
Follow one component through the pipeline
Back to our component:
import { Component } from '@angular/core'; @Component({ selector: 'app-user', template: '<p>Hello {{ name }}</p>', }) export class User { name = 'Ada'; } Step 1: The Rust analyzer discovers the component
Oxc parses the file. Angular's analyzer resolves the decorator, recognizes a component, and extracts its metadata. Conceptually, the resulting task looks like this (a simplified illustration, not the real internal structure):
{ className: 'User', component: { selector: 'app-user', template: '<p>Hello {{ name }}</p>', }, } Look at the template field: it's still a string. No rendering function exists yet, and no ɵɵtextInterpolate instruction has been generated. The analyzer has worked out what to compile, but it hasn't compiled anything.
Step 2: The template becomes runtime instructions
The TypeScript backend picks up the task. The template compiler parses the template, builds its IR, runs its transformations, and generates the runtime definition. Conceptually, user.ng.ts contains something like:
import * as i0 from '@angular/core'; export class User { name = 'Ada'; static ɵcmp = i0.ɵɵdefineComponent({ type: User, selectors: [['app-user']], decls: 2, vars: 1, template: function User_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, 'p'); i0.ɵɵtext(1); i0.ɵɵelementEnd(); } if (rf & 2) { i0.ɵɵadvance(); i0.ɵɵtextInterpolate1('Hello ', ctx.name); } }, }); } The exact instructions and options vary with the Angular version and compilation mode, but the shape is what matters. The rf & 1 branch runs once to create the DOM; the rf & 2 branch runs on every change detection pass to update it.
This is where metadata becomes executable rendering behavior, and Oxc had no part in it. Angular's template compiler did all of it.
Step 3: The template also becomes code to type-check
Angular also has to verify that {{ name }} is valid: that name exists on User and is used in a type-safe way. Runtime instructions aren't a good place to get that from TypeScript, so Angular generates separate TypeScript whose only purpose is to be type-checked: a Type Check Block (TCB).
Greatly simplified:
function checkUser(ctx: User) { '' + ctx.name; } Now break the template:
<p>{{ name.toFixed(2) }}</p> The TCB becomes:
function checkUser(ctx: User) { ctx.name.toFixed(2); } TypeScript reports that toFixed doesn't exist on string, and source mappings let Angular tooling point the error back to the right spot in the template.
Type-check blocks aren't new. They date back to Ivy, and today's ngc already generates .ngtypecheck.ts shim files. What changes is where they live. In ngc, these shims exist only inside Angular's own TypeScript program. In ngp, they become standalone outputs: user.ng.ts contains the transformed runtime code, and user.ngtypecheck.ts contains what's needed for template type checking. The type-check file is never bundled into the application.
Turning these files from compiler internals into plain outputs that other tools can consume is, in my view, the most important architectural change in the new compiler.
Why separating code generation from type checking matters
In ngc, Angular's analysis, template type checking, and emit all run inside TypeScript programs that Angular itself creates and drives, including its transformer pipeline. Angular owns the whole process. With ngp, Angular produces plain TypeScript, and any compatible tool can take it from there.
For type checking, a TypeScript-compatible checker analyzes application code plus the generated type-check files. Candidates include Microsoft's tsgo and the experimental Rust implementation tsrs.
For JavaScript emission, a tool such as esbuild or Rolldown turns the generated runtime TypeScript into JavaScript. It never needs to understand @Component, because Angular has already lowered it into ordinary static fields.
Angular is responsible for Angular compilation, and every other tool does its own specialized job. A few consequences follow.
Angular can evolve separately from TypeScript's implementation. It still needs a TypeScript-compatible checker, but its code-generation frontend no longer depends on TypeScript's JavaScript AST and transformer API.
Each stage can use its own performance strategy. Analysis runs in parallel in Rust. Template compilation reuses mature code. Type checking uses a compiler built for whole-program analysis. Emission uses tools built for fast transpilation. They don't have to share a language.
Incremental compilation becomes an explicit design problem. Editing one template should only require regenerating that component's .ng.ts and .ngtypecheck.ts. Changing a directive's public inputs, though, can make templates elsewhere invalid. The architecture makes these boundaries easier to reason about, but it doesn't make incremental builds fast by itself. That depends on dependency tracking, invalidation, and caching, and it's worth watching as ngp matures.
Why not rewrite the template compiler in Rust now?
I can only speculate about the team's reasoning, but looking at the code suggests one obvious factor: the template compiler represents years of work. It covers binding expressions, embedded views, directives, control flow, @defer, dependency resolution, and code generation. Rewriting all of it while also moving off TypeScript's compiler APIs would mean changing everything at once.
What the current code shows is a staged approach. The dependency on TypeScript's transformation pipeline is gone, and the existing template compiler is reused behind a new frontend.
From the outside, this looks like a sensible trade-off to me. A compiler rewrite isn't only a performance project; it's a compatibility project. Generated code, diagnostics, source maps, and runtime behavior must all stay correct, and reusing the template compiler limits how much changes at once.
What about VoidZero's oxc-angular-compiler?
voidzero-dev/oxc-angular-compiler is a separate project worth knowing about. It's an experimental Angular compiler built on Oxc that implements template compilation natively in Rust, the step ngp currently leaves in TypeScript. It shows that more of the pipeline can move into Rust.
It is not ngp. The repositories have different goals, maturity levels, and approaches, and VoidZero describes its compiler as experimental and seeking maintainers. According to InfoQ's coverage, the Angular team has said VoidZero's work influenced the architecture and that the two groups have been collaborating, but ngp is the official effort.
Is it actually faster?
On October 27, 2026, Cédric Exbrayat published an early benchmark on the Ninja Squad blog. He compiled three projects with 15, 56, and 1,714 components using a next build of ngp (22.3.0-next.2) that he built from source, comparing the existing ngc compiler against two new pipelines: ngp with tsgo (TypeScript 7.1) and esbuild, and ngp with tsrs and Rolldown. He described ngp at that point as an internal tool, with some of the shared test suite still failing.
The results were promising. Compared with ngc, cold compilation pipelines ran roughly 2–3× faster across the tested projects. On the largest project, memory use dropped from about 2.8 GB to 1.4 GB. A pipeline combining ngp, tsrs, and Rolldown performed especially well.
Keep these numbers in context. The benchmark measured compilation, type checking, and per-file JavaScript emission, not full bundling or minification, and it used prerelease and experimental tools. It does not mean every ng build is now two or three times faster.
Still, the results are encouraging precisely because the template compiler is mostly reused. That suggests a large share of the improvement comes from changing the architecture around it, not from rewriting every stage.
Source: How much faster is the new Angular compiler? — Ninja Squad.
What this means for you
For application developers: nothing to install or enable. Keep using ng build, which still runs ngc. ngp is not a production compiler, and the experimental opt-in the Angular team described has not shipped.
If your build relies on the old architecture, start paying attention. That includes custom TypeScript transformers in your Angular build, custom builders or Nx plugins that use ngc internals, and tools that read Angular's compiler APIs directly. TypeScript 7 no longer offers the ts.Transformer API that ngc builds on, and I haven't seen any public guidance yet on what extension points an ngp-based build will offer instead.
If you build tooling, the outlook is better. Generated .ng.ts files are plain TypeScript, so any transpiler or bundler can process Angular code without understanding Angular.
Where things stand (November 18, 2026)
ngp is in Angular's repository and under active development. It is an early-stage prototype. It is not in a production release, and application developers cannot switch a project over to it.
The Angular team's September 24, 2026 update is the status that matters. They wrote that ngp was nearing an MVP, that they were testing it on Google's Angular applications, and that CLI and language-service integration were still prototypes. They aimed to ship an experimental version people could try in their own projects later in 2026. That opt-in has not shipped.
The preprocessor README on main says the same thing more bluntly. It labels the code an early-stage prototype and says the team is not accepting external issues, bug reports, or pull requests.
The October 27 benchmark used 22.3.0-next.2, a next build compiled from source. Ninja Squad wrote that ngp was still an internal tool and that some tests shared with ngc were still failing. Measuring that build is a research exercise. Adopting it in an application has to wait for the experimental release the Angular team described.
ngc remains the compiler behind ng build. Follow the work in Angular's preprocessor directory.
The bigger lesson
I started looking into this because of Oxc. I came away thinking Oxc is only one part of the story.
Oxc provides source-language infrastructure. Angular's Rust analyzer understands Angular declarations and builds compilation tasks. Angular's template compiler turns those tasks into Ivy definitions and type-check blocks. Downstream tools check types and emit JavaScript.
Angular is separating responsibilities that used to be tied to TypeScript's compiler. That gives it room to adopt faster tooling and move more stages into native code over time.
Sometimes the biggest performance improvement doesn't come from rewriting an algorithm. It comes from changing the boundaries between systems.
For Angular, those boundaries are changing now. If you work with ASTs, compilers, or build tooling, that's the part worth watching.
Source code and further reading
Angular implementation
Angular preprocessor — ngp and ng-analyze
Angular's compileComponentFromMetadata
Angular's existing NgtscProgram
Angular's Ivy transformation implementation
Architecture and context
Angular team's announcement: TypeScript 7-powered compiler
TypeScript 7.1 Beta — new compiler API
VoidZero's experimental Oxc Angular compiler
Ninja Squad's compiler benchmark
InfoQ: Angular's TypeScript 7-powered compiler enters beta
Keep up with me
I help engineering teams modernize legacy systems, simplify complex architectures, and make better architectural decisions. Twenty years in software development.
Architecture consulting and reviews, legacy modernization, mentoring, and hands-on development.
Follow me on Twitter and at shlomi-levi.dev. Message me on LinkedIn.


