Web framework: Astro 6.0 experiments with new Rust compiler

An experimental Rust compiler is intended to replace the previous Go compiler, and the Astro dev server now supports custom runtimes.

listen Print view
Exploding star

(Image: muratart / Shutterstock.com)

3 min. read
Contents

The open-source JavaScript framework Astro has reached version 6.0. It includes numerous innovations, including a revision of the development server and an integrated Fonts API. The existing features Live Content Collections and Content Security Policy API are now stable. As an experimental feature, a new Rust compiler is in the pipeline as a successor to the Go-based compiler.

JavaScript conference by heise: enterJS 2026

(Image: jaboy/123rf.com)

Tools and trends in the JavaScript world: The enterJS 2026 will take place on June 16 and 17 in Mannheim. The program revolves around JavaScript and TypeScript, frameworks, tools and libraries, security, UX, and more. Early bird tickets are available in the online ticket shop.

As the Astro team explains, the new Rust compiler initially began as an AI experiment. However, since it has proven to be faster and sometimes even more reliable than the Go compiler, it is intended to become the standard in the future. Interested parties can already try it out by activating the rustCompiler flag and installing the corresponding package (npm install @astrojs/compiler-rs). The Astro developers are also reportedly already working on further Rust-based tooling.

In Astro 6.0, developers will find an integrated Fonts API. This allows fonts to be configured using local files or providers such as Google or Fontsource. Astro then handles further tasks such as downloading and caching for self-hosting or generating optimized fallbacks.

Since Astro 2.0, Content Collections have been included. These allow developers to manage sets of structured content in Astro projects, such as blog entries or product descriptions. Astro can handle locally stored data in Markdown, MDX, Markdoc, YAML, TOML, or JSON formats for this purpose. Previously, Content Collections required a rebuild when content changed.

Thanks to the now stable Live Content Collections, this is a thing of the past: they capture content at request time and allow immediate content updates without a rebuild. Astro developers can define a live source in the src/live.config.ts file using defineLiveCollection(). Live Content Collections can be used in the same project alongside the classic Content Collections.

Videos by heise

Also stable is a security-relevant feature, the Content Security Policy API. According to the Astro team, Astro is one of the first JavaScript meta-frameworks to offer integrated support for Content Security Policy (CSP) for static and dynamic pages in both server and serverless environments.

Astro's development server astro dev has been revised to work with runtimes other than Node.js, such as Cloudflare's workerd runtime. Vite's new Environment API is used for this. Since the dev server was originally designed for Node.js, developers could not use the actual production runtime during development when using other runtimes like Cloudflare Workers, Bun, or Deno. Now they can select a custom runtime environment during development. The dev server and build pipeline use the same code paths in Astro 6.0.

This revision stems from the official partnership with Cloudflare, which supported Astro with 150,000 US dollars last fall. In January 2026, Astro was acquired by Cloudflare but is to remain open source.

Further details on the innovations in Astro 6.0 can be found in the Astro blog.

(mai)

Don't miss any news – follow us on Facebook, LinkedIn or Mastodon.

This article was originally published in German. It was translated with technical assistance and editorially reviewed before publication.