Astro 7.0 | Astro
Skip to content
Show Menu
Astro 7 is here! This release is all about speed. The .astro compiler has been rewritten in Rust. Markdown and MDX processing now runs through a new Rust-powered pipeline. The rendering engine has been replaced with a faster queue-based approach. Together with Vite 8 and its new Rolldown bundler, Astro 7 builds are 15-61% faster in our benchmarks. The fastest build is the one that doesn’t happen at all, so Astro 7 also stabilizes route caching and adds experimental CDN cache providers for Netlify, Vercel, and Cloudflare.
Astro 7 also introduces Advanced Routing, giving you a src/fetch.ts entrypoint with full control over Astro’s request pipeline. For AI-assisted development, Astro can now detect coding agents, run the dev server in the background, and output structured JSON logs when agents need machine-readable feedback.
Full release highlights include:
Vite 8
Performance
Rust Compiler
Markdown & MDX in Rust
Queued Rendering
Advanced Routing
Route Caching
CDN Cache Providers
AI Enhancements
Background Dev Server
JSON Logging
Community
Upgrade now
To upgrade an existing project to Astro 7, use the automated @astrojs/upgrade CLI tool:
# Recommended:
npx @astrojs/upgrade
# Manual:
npm install astro@latest
For new projects, simply use:
npm create astro@latest
See the upgrade guide for detailed migration steps.
Vite 8
Astro 7 upgrades to Vite 8, the most significant Vite release in years. The headline change: Vite now ships Rolldown, a Rust-based bundler that replaces both esbuild and Rollup with a single, unified bundler. Rolldown is 10-30x faster than Rollup in benchmarks while supporting the same Rollup and Vite plugin APIs.
For Astro users, this means faster builds with no configuration changes for most projects. Vite 8 includes a compatibility layer that auto-converts existing esbuild and rollupOptions configuration to their Rolldown equivalents. If your project uses custom Vite plugins, most of them should continue to work because Rolldown supports the same plugin API as Rollup.
Performance
Astro 7 is the fastest version of Astro to date. As usage has grown, more teams have been pushing the boundaries of what type of site can be built with Astro. After we released Astro 6 and its big internal refactor, we set our sights on helping Astro scale to larger and more complex sites.
This is how Astro builds work:
Bundle the site’s pages, content, and client components into JavaScript.
Run the bundled code like a little server, create requests for each prerendered page, and save the resulting HTML.
Astro 7 improves both steps, but focuses on the first: bundling the site. The biggest gains come from moving some of the slowest parts of the build into native code written in Rust. The generation step is also faster, thanks to a new rendering strategy that more effectively queues sections to be rendered.
In our testing, overall build times improved by 15–61%, with some sites building more than twice as fast . Sites where .astro compilation and Markdown processing make up a larger share of the build see the biggest gains, since those are exactly the parts that moved to Rust.
These benchmarks were run on a MacBook Pro Apple M4 Pro with 48 GB of memory:
WebsiteBeforeAfterhttps://docs.astro.build (~6,313 pages)114.54s73.53shttps://astro.build (~308 pages)62.70s24.24shttps://biomejs.dev (~6,488 pages)176.39s149.90shttps://developers.cloudflare.com (8,431 pages)386.89s261.94shttps://tauri.app (7,117 pages)86.12s55.33shttps://aspire.dev (13,275 pages)385.84s326.11s<br>Rust Compiler
We built a new compiler for the .astro component format, now written in Rust. The compiler is a full rewrite of our previous Go-based compiler that is mostly backwards compatible, except for:
No more HTML correction. The Go compiler silently rewrote your markup to be “valid HTML” by reordering elements, auto-closing tags, and moving nodes around in ways that often surprised users and caused hard-to-debug issues. The new compiler treats your markup as-is.
JSX-style strictness. Unclosed tags like Hello and unterminated attributes like now produce errors instead of being silently corrected. These are real bugs in templates that the old compiler silently ignored in an attempt to behave like the browser.
JSX whitespace handling. Whitespace between elements is now collapsed following JSX conventions, matching the behavior of React and other JSX-based frameworks. For example, newlines between inline elements no longer produce a visible space:
span>Hellospan>
span>Worldspan>
span>Hellospan>{' '}span>Worldspan>
HelloWorldHello{' '}World">
Moving to Rust allowed us to ship native binaries for supported platforms, with a WASM fallback for environments that need it. This pattern is now standard in the JavaScript tooling world, used by projects such as Rolldown and Lightning CSS. Under the hood, the new compiler is built on oxc for parsing and Lightning CSS for CSS...