If you have been reading GhostProgrammer for a while, you know we have a long history with Angular—sixteen articles deep into Angular Material layouts, tables, and forms paired with Spring Boot backends. For years, the one persistent complaint from full-stack Java/Angular teams was never Angular’s architecture; it was waiting forty-five seconds for ng serve to cold-start and watching a dev server swallow 3.6 GB of RAM on a medium enterprise app.
That era is coming to a close.
In November 2026, Angular’s new hybrid Rust-and-TypeScript preprocessor (ngp) entered beta inside @angular/compiler-cli (22.3.0-next.2, landed via a massive +372,603-line monorepo integration commit) alongside Microsoft’s TypeScript 7.1 Beta. Early benchmarks are stunning: 2.0× to 2.9× faster cold builds, 50% lower peak memory, and 112 ms Vite template HMR (a 23× jump over classic full reloads).
In this article, we will unpack why TypeScript 7 forced Angular to rethink its compiler from first principles, trace the 3-stage ngp Rust/Oxc architecture, look at the verified benchmarks, and give Spring + Angular teams a concrete readiness checklist to adopt today.
1. Why TypeScript 7 (tsgo) Broke Classic ngc
Ever since Angular 4.3 (and Ivy in Angular 9), the ahead-of-time Angular compiler (ngc) operated by wrapping tsc in-process and plugging directly into TypeScript’s JavaScript ts.Transformer API. Before emitting JavaScript, ngc built a whole-project ts.Program, ran in-memory Ivy template type-checking, and transformed @Component, @Directive, and @Pipe decorators into Ivy runtime instructions (ɵɵ*).
When Microsoft released TypeScript 7.0—rewritten natively in Go (tsgo)—it removed the legacy JavaScript ts.Transformer API. Calling across a Go↔JavaScript IPC boundary for every single file’s AST transformation would destroy the very speedups Go was built to deliver.
While frameworks like Vue, Svelte, and Astro adopted TypeScript 7.1’s new out-of-process contentMappers (tsc --runExternalCode) protocol, Angular’s decorators and Ivy runtime transformations needed a cleaner separation. Rather than fighting tsgo, the Angular team decoupled Angular compilation completely from tsc—and built ngp.
(Note: VoidZero’s April 2026 research prototype oxc-angular-compiler skipped full template type-checking and is now seeking maintainers; VoidZero and the Angular team collaborated so ngp is the official path forward.)
2. Inside the 3-Stage Hybrid ngp Pipeline
Instead of embedding inside TypeScript, ngp runs as a standalone source-to-TypeScript preprocessor built on Oxc—VoidZero’s blazing-fast Rust parser and AST toolchain powering Vite 8+.
Legacy ngc (TS 5 / TS 6):
.ts + .html ──▶ Monolithic JS ts.Program ──▶ In-Memory TCB ──▶ ts.Transformer ──▶ JS
New Hybrid ngp (Angular 22.x Beta + TS 7.1):
.ts + .html ──▶ [Stage 1] Rust Oxc Analyzer (ng-analyze, multi-threaded)
│
▼ (metadata stream)
[Stage 2] @angular/compiler (TypeScript template codegen)
├──▶ component.ts ──▶ [Stage 3a] esbuild / Rolldown (JS emit)
└──▶ component.ngtypecheck.ts ──▶ [Stage 3b] tsgo 7.1 / tsrs (type-check)
Let’s walk through what happens to a modern Signal-based standalone component at each stage:
// user.component.ts (Your source file)
import { Component, input } from '@angular/core';
@Component({
selector: 'app-user',
standalone: true,
template: `<p>Hello {{ name() }}</p>`
})
export class UserComponent {
readonly name = input.required<string>();
}
- Stage 1 — Parallel Rust Analysis (
ng-analyze+ Oxc): Written in Rust (~56,000 lines with N-API and WebAssembly targets),ng-analyzeparses TypeScript ASTs across CPU cores, evaluates decorators, and resolves component/pipe metadata—without building a heavy whole-projectts.Programupfront. - Stage 2 — Dual-File TypeScript Emission (
@angular/compiler): Streams that metadata into Angular’s battle-tested template compiler to emit two plain TypeScript files:
user.component.ts(Runtime Output): Lowers@Componentinto standard Ivy instructions (ɵɵdomElementStart,ɵɵtextInterpolate1('Hello ', ctx.name())) typed cleanly so bundlers can strip types immediately.user.component.ngtypecheck.ts(Type Check Block Sidecar): Emits synthetic TypeScript functions strictly bound tothis: i0.UserComponentthat validate every template binding (this.name()), keeping 100% of Ivy’s template type safety without private compiler hooks. This sidecar never ships in production bundles.
- Stage 3 — Parallel Native Type-Checking & JS Bundling:
- Type-Checking: Native
tsgo(TypeScript 7.1) or experimental Rusttsrschecks bothuser.component.tsanduser.component.ngtypecheck.tsin parallel. - JS Emission:
esbuildorRolldownstrips TypeScript syntax fromuser.component.tsimmediately—never waiting on semantic type-checking.
Because Stage 2 still runs the existing JavaScript @angular/compiler template generator, porting Stage 2 to Rust later gives the Angular team another huge performance runway once full parity tests pass.
3. Verified Benchmarks: Cold Builds, Memory, and Per-File Vite HMR
Independent benchmarks from Cédric Exbrayat (Ninja Squad) on 22.3.0-next.2 (2-vCPU CI-like Linux runners) and Christopher Holder (Push-Based.io) testing per-file compilation with vite-plugin-ngp put real numbers behind the architecture.
Cold-Build Performance (Ninja Squad)
| App Scale | Legacy ngc (TS 6) | ngp + tsgo (TS 7.1) + esbuild | ngp + tsrs + Rolldown | Peak RAM (ngc → ngp) |
|---|---|---|---|---|
Small (15 components) | 5.13 s | 1.91 s (2.69× faster) | 1.75 s (2.93× faster) | Lower across all sizes |
Medium (56 components) | 6.97 s | 3.24 s (2.15× faster) | 2.59 s (2.69× faster) | Lower across all sizes |
Large (1,714 components) | 72.15 s | 36.22 s (1.99× faster) | 26.43 s (2.73× faster) | 2.8 GB → 1.4 GB (-50%) |
And notice where TypeScript 7.1 helps even further: compared to TS 7.0.2 (which actually suffered a memory spike on large repos), Microsoft’s ~48 Go optimizations in TypeScript 7.1 Beta cut memory another 15.8%–49.6% and speed up checking by 1.2×–1.9×.
On-Demand Dev Server Scaling (Push-Based.io — vite-plugin-ngp)
Because ngp compiles one file at a time without constructing a whole-program TypeScript graph before serving page one, dev servers stop scaling linearly with repository size:
| Metric | Super Productivity (252 comps) | Ghostfolio (157 comps) | Synthetic 5,000-Comp App |
|---|---|---|---|
| Cold Start to First Page | 10.5 s vs. 17.4 s | 7.5 s vs. 16.3 s | 1.6 s vs. 28.4 s (17.8× faster) |
| Template Edit HMR | 112 ms vs. 2.6 s (23.2×) | 111 ms vs. 3.0 s (27.0×) | — |
| Dev Server RAM | 1.7 GB vs. 3.6 GB (-53%) | 0.85 GB vs. 3.6 GB (-76%) | — |
4. Production Reality Check & Your Readiness Checklist
Do not switch production builds to ngp or 22.3.0-next.2 yet. ngp is still completing ngc‘s Jasmine conformance suite, is not yet published as a standalone npm binary, and full Angular CLI & Language Service rollout targets an upcoming Angular 22 minor release once TypeScript 7.1 stabilizes its modular compiler API (typescript/sync, typescript/fs).
What you should do right now is make your Angular workspaces zero-friction ready so flipping the ngp switch on release day takes five minutes:
- Upgrade to Angular 20+: If your Spring Boot + Angular monorepo is still sitting on Angular 16–18, walk up to Angular 20+ via
ng updatefirst. - Finish Migrating to Standalone Components & Signals: Standalone components without heavy
NgModulegraphs sit squarely onngp‘s per-file fast path. - Turn On
isolatedModulesandverbatimModuleSyntax: Per-file compilation fails fast on ambiguous type re-exports unless they useexport type { ... }. - Purge Deprecated TS 6
tsconfig.jsonFlags: Options silently tolerated in TypeScript 6—likebaseUrlandimportsNotUsedAsValues—become hardTS5023build errors in TypeScript 7.
// tsconfig.json — ngp & TypeScript 7 Readiness Baseline
{
"compilerOptions": {
"strict": true,
"target": "ES2026",
"module": "ESNext",
"moduleResolution": "bundler",
"isolatedModules": true,
"verbatimModuleSyntax": true,
"useDefineForClassFields": false
},
"angularCompilerOptions": {
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}
Conclusion
For years, Angular developers watched Vite-based frameworks enjoy sub-second HMR while ngc chugged through whole-program TypeScript builds. By turning Microsoft’s TypeScript 7 breaking change into a clean architectural break, the Angular team built a Rust/Oxc preprocessor that preserves 100% of Ivy’s strict template type-checking while cutting build times in half and slashing dev memory by up to 76%. Get your tsconfig.json strict, finish your Standalone + Signals cleanup, and stay ready for Angular 22’s ngp rollout.
Discover more from GhostProgrammer - Jeff Miller
Subscribe to get the latest posts sent to your email.

