NewsJavaScriptDeveloper Tools

Angular’s Rust-Powered Compiler Is in Beta — 3x Faster Builds

Angular just shipped a beta for ngp, a Rust-powered compiler preprocessor that trims build times by up to 3x and cuts peak memory in half. This isn’t a performance polish — it’s a full architectural shift, forced by TypeScript 7’s Go rewrite, which quietly removed the internal APIs Angular’s compiler has relied on for years. The result: Angular decoupled from TypeScript’s internals, gained a parallel Rust analysis layer, and landed at the front of the Rust-eats-the-JS-toolchain wave reshaping frontend development in 2026.

The Numbers

Cédric Exbrayat of Ninja Squad benchmarked ngp against three real Angular projects ranging from 15 to 1,714 components. Cold builds came in 2x to 3x faster. On the largest project, peak memory dropped from 2.8 GB to 1.4 GB.

The number that will actually change your day: template edits now apply in 112 milliseconds instead of triggering a 2.6-second full reload. The Angular team’s own benchmarks put the range at 1.3x–3.6x faster than ngc, with one-third to two-thirds less peak memory.

Why TypeScript 7 Forced This

TypeScript 7.0 landed in July 2026 with its compiler rewritten in Go — 8 to 12 times faster type-checking. The catch: the Go port removed the Transformer API that Angular’s ahead-of-time compiler depends on for decorators and template compilation. Angular 22 currently requires TypeScript 6.0. So do Vue, Svelte, and Astro. Every major framework that reaches into TypeScript’s internals hit the same wall.

The Angular team’s response was to stop depending on TypeScript internals entirely. Rather than wait for Microsoft to stabilize a new programmatic API — which TypeScript 7.1 is expected to deliver around November 24 — they built their own analysis layer in Rust. That’s ngp.

What ngp Actually Is

ngp is a hybrid compiler. The Rust frontend, built on Oxc (the VoidZero toolchain powering Vite 8 and Rolldown), analyses Angular files in parallel — discovering decorators, resolving component metadata, and handling work that ngc previously delegated to TypeScript internals. The TypeScript backend still handles template type-checking, producing the Type Check Block (TCB) that keeps Angular templates fully type-safe.

The commit that landed the core ngp work on October 8 was 370,000+ lines, around 56,000 of them Rust. VoidZero’s earlier experimental Oxc Angular compiler, released in April, hit up to 20x speedups on narrower workloads. ngp is more conservative in scope but covers the full compiler pipeline — and it’s the official path forward.

Rust Is Eating the JS Toolchain

Angular’s move is not happening in isolation. In 2026, the JavaScript build ecosystem shifted wholesale to native-compiled tools:

  • Vite 8 (March 2026): Moved to Rust-based Rolldown bundler
  • Rspack 2.0 (April 2026): Webpack-compatible Rust bundler with Oxc integration
  • Oxc: Reached parity with ESLint and Prettier at up to 100x their speed
  • Bun: Rewrote its core from Zig to Rust in May 2026
  • TypeScript 7: Go rewrite, 8–12x faster type-checking

Angular was one of the last major frameworks still running its critical compilation path in pure JavaScript. ngp ends that.

How to Try the Beta

The Angular team is clear: do not use ngp in production yet. This is a beta for experimentation and feedback. If you want to try it:

  1. Be on Angular v20 or later
  2. Install vite-plugin-ngp
  3. Wire it into your Vite config
import { angular } from 'vite-plugin-ngp';

export default {
  plugins: [ angular() ]
}

The production path arrives when TypeScript 7.1 ships (expected November 24) and Angular 22 ships a minor release adopting ngp as default. Keep production builds on ngc until then, and track the Angular blog for the official migration guide.

Angular’s biggest compiler overhaul since Ivy is here — just not quite ready for your CI pipeline yet. Mark November 24 on your calendar.

ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *

    More in:News