Astro 7.0

astro.build208 pointsby saikatsg57 comments

Discussion summary

Astro 7.0 introduces build speed improvements but still faces some bottlenecks, especially with mixed JavaScript and Rust components. Users discuss its integration with tools like Hono and AstroCMS, and consider upgrade implications.

What the discussion says

  • Build times are still a concern, especially with mixed language components.
  • Hono is seen as a modern, TypeScript-friendly backend framework.
  • Astro is favored for site building, with some considering upgrading from earlier versions.
Build time improvements are always welcome, great job!
mordras
Hono is a de-facto new express with proper TypeScript support.
brachkow

Comments

Hacker News

Exhausting

by turkeyboi

because money

by keepupnow

Are these typical build speeds on static sites these days? It's slower than I expected for a rust re-write. (Or I guess maybe the portion re-written in rust is only a small part of the build pipeline time?)

My understanding is that astro isn't considered particularly slow?

by big_toast

Yeah, the parts rewritten in Rust here as only parts of the bottleneck. A lot of it is still JavaScript (including the user's code!). If Astro was just .md -> HTML, it'd of course be much faster.

by Princesseuh

I saw the integration with Hono - hadn't heard of it before, do many people use it?

by shay_ker

Hono is a) de-facto new express with proper typescript support b) the way to write serverless code that is not nailed to current platform quirks

So, yes, it’s very widely used backend for modern typescript backends

by brachkow

For me currently nothing beats Astro + Claude Code for building sites, maybe with some image generator sprinkled in. Build time improvements are always welcome, great job!

by mordras

I have been trying to convince my marketing department to replace there archaic wordpress with an Astro build with AstroCMS and markdown for there needs.

I have build several sites using Astro 6, and i am finding the ease of building the sites amazing and exceptional in SEO as well.

by stevoo

What’s AstroCMS?

by gigatree

I like the idea of astro, but never really used it. My main concern is. Does v7 mean that there have been 7 breaking changes thus far? So if I started my project on v1, I had to revise it 6 times to date?

If yes, then this instability is a serious concern to me.

by yolkedgeek

If you are using every single feature Astro has, your code somehow goes through every single branch (of every single dependency), etc then yes, but that'd be a pretty far-fetched scenario!

In practice, our users typically comment quite positively on how little (if any) work major updates requires, and we offer pretty extensive upgrade guides, if that helps.

by Princesseuh

Switch from widely supported unified/rehype to own rehype-incompatible markdown tooling just for build time speed improvement is quite upsetting

Good that they added a tool to keep using rehype, but I’m unsure that it will last

by brachkow

We don't intend on removing support for the unified ecosystem, we on purpose made the Markdown processing pipeline pluggable so that it was possible for both to exists!

The vast majority of our users don't use any sort of unified plugins, so a pipeline that's faster (and about 100 deps leaner) felt like a better default.

by Princesseuh

I upgraded my website recently and it's exciting! That being said, I admit my builds didn't get faster (they actually on average slowed down a bit). Hopefully that improves, but worth noting.

by cassidoo

How many pages is it? The performance improvements are mostly for larger sites (thousands of pages) and especially when using a lot of MDX.

We're working on incremental builds which should help as well: https://github.com/withastro/roadmap/issues/1388

by MatthewPhillips

I really really like Astro, but I'm either getting old or it's something else.

I just recently updated my website to Astro 6 and now... there's Astro 7. Maybe by the time I update, Astro 8 will be a few weeks in the future.

by fnoef

(As an outsider, ) I suspect it's because the Rust rewrite was big enough to bump the main version number.

by ulimn

Cloudflare bought Astro recently, and as it states in docs it previously had cache plugins for 2 companies but not Cloudflare so that may have been a motivation along with the Vite update mentioned

by fsuts

We unfortunately released Astro 6 only a few weeks before Vite 8 / Rolldown came out, which is why we did Astro 7 so soon. But there are very few breaking changes compared to Astro 6. That being said, some of these performance improvements (the Sätteri processor) are available in Astro 6 too.

by MatthewPhillips

I had tried astro for my personal website when it was released. It was a mess for me. I couldn't keep with so many components. I keep breaking things, one way or the other. I might have to try again to see what things have changed.

by pks016

I don't understand what this is, based on this statement:

"Astro supports every major UI framework. Bring your existing components and take advantage of Astro's optimized client build performance."

But isn't Astro a framework itself? And then apparently you need Node as well. The frameworks upon frameworks in Web development are baffling.

by MoonWalk

Web dev is a royal mess, but what isn't in current times? Too many opinions not enough direction.

by keepupnow

It means the island bit where you can mark areas of a page as non static and then run react or other framework as components

by fsuts

Astro is a meta-framework that allows you to plug in other web frameworks where you need it (React, Solid, etc). Although it would also be fair to consider Astro a sort of build tool / bundler.

Node is a runtime, not a framework.

So there's really only one framework here (Astro). Using other web frameworks within it is completely optional.

by genshii

The AI Enhancements section was interesting. I've been wondering about the best practices for agents interacting with long-running dev servers, and Astro 7's approach (run in background and have a logs command) seems like a good model.

by AgentME

The switch to strict HTML compilation is just not cool, and actively prevents upgrading sites which need to deal with remote content that is not written in strict HTML.

I also wish there could be a general purpose content processing API so I can plug a different format than markdown (such as typst)

by microflash

this terrified me lol I'm on 5.1.x on most of my sites

by BorisMelnik

"The .astro compiler has been rewritten in Rust.".

I'm personally awaiting the rewrite to assembly.

by keepupnow

Rust is so powerful it rewrites your code to assembly on-demand every time you compile ;)

by wofo

Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • Exhausting
    by turkeyboi
  • because money
    by keepupnow
  • Are these typical build speeds on static sites these days? It's slower than I expected for a rust re-write. (Or I guess maybe the portion re-written in rust is only a small part of the build pipeline time?)

    My understanding is that astro isn't considered particularly slow?

    by big_toast
  • Yeah, the parts rewritten in Rust here as only parts of the bottleneck. A lot of it is still JavaScript (including the user's code!). If Astro was just .md -> HTML, it'd of course be much faster.
    by Princesseuh
  • I saw the integration with Hono - hadn't heard of it before, do many people use it?
    by shay_ker
  • Hono is a) de-facto new express with proper typescript support b) the way to write serverless code that is not nailed to current platform quirks

    So, yes, it’s very widely used backend for modern typescript backends

    by brachkow
  • For me currently nothing beats Astro + Claude Code for building sites, maybe with some image generator sprinkled in. Build time improvements are always welcome, great job!
    by mordras
  • I have been trying to convince my marketing department to replace there archaic wordpress with an Astro build with AstroCMS and markdown for there needs.

    I have build several sites using Astro 6, and i am finding the ease of building the sites amazing and exceptional in SEO as well.

    by stevoo
  • What’s AstroCMS?
    by gigatree
  • I like the idea of astro, but never really used it. My main concern is. Does v7 mean that there have been 7 breaking changes thus far? So if I started my project on v1, I had to revise it 6 times to date?

    If yes, then this instability is a serious concern to me.

    by yolkedgeek
  • If you are using every single feature Astro has, your code somehow goes through every single branch (of every single dependency), etc then yes, but that'd be a pretty far-fetched scenario!

    In practice, our users typically comment quite positively on how little (if any) work major updates requires, and we offer pretty extensive upgrade guides, if that helps.

    by Princesseuh
  • Switch from widely supported unified/rehype to own rehype-incompatible markdown tooling just for build time speed improvement is quite upsetting

    Good that they added a tool to keep using rehype, but I’m unsure that it will last

    by brachkow
  • We don't intend on removing support for the unified ecosystem, we on purpose made the Markdown processing pipeline pluggable so that it was possible for both to exists!

    The vast majority of our users don't use any sort of unified plugins, so a pipeline that's faster (and about 100 deps leaner) felt like a better default.

    by Princesseuh
  • I upgraded my website recently and it's exciting! That being said, I admit my builds didn't get faster (they actually on average slowed down a bit). Hopefully that improves, but worth noting.
    by cassidoo
  • How many pages is it? The performance improvements are mostly for larger sites (thousands of pages) and especially when using a lot of MDX.

    We're working on incremental builds which should help as well: https://github.com/withastro/roadmap/issues/1388

    by MatthewPhillips
  • I really really like Astro, but I'm either getting old or it's something else.

    I just recently updated my website to Astro 6 and now... there's Astro 7. Maybe by the time I update, Astro 8 will be a few weeks in the future.

    by fnoef
  • (As an outsider, ) I suspect it's because the Rust rewrite was big enough to bump the main version number.
    by ulimn
  • Cloudflare bought Astro recently, and as it states in docs it previously had cache plugins for 2 companies but not Cloudflare so that may have been a motivation along with the Vite update mentioned
    by fsuts
  • We unfortunately released Astro 6 only a few weeks before Vite 8 / Rolldown came out, which is why we did Astro 7 so soon. But there are very few breaking changes compared to Astro 6. That being said, some of these performance improvements (the Sätteri processor) are available in Astro 6 too.
    by MatthewPhillips
  • I had tried astro for my personal website when it was released. It was a mess for me. I couldn't keep with so many components. I keep breaking things, one way or the other. I might have to try again to see what things have changed.
    by pks016
  • I don't understand what this is, based on this statement:

    "Astro supports every major UI framework. Bring your existing components and take advantage of Astro's optimized client build performance."

    But isn't Astro a framework itself? And then apparently you need Node as well. The frameworks upon frameworks in Web development are baffling.

    by MoonWalk
  • Web dev is a royal mess, but what isn't in current times? Too many opinions not enough direction.
    by keepupnow
  • It means the island bit where you can mark areas of a page as non static and then run react or other framework as components
    by fsuts
  • Astro is a meta-framework that allows you to plug in other web frameworks where you need it (React, Solid, etc). Although it would also be fair to consider Astro a sort of build tool / bundler.

    Node is a runtime, not a framework.

    So there's really only one framework here (Astro). Using other web frameworks within it is completely optional.

    by genshii
  • The AI Enhancements section was interesting. I've been wondering about the best practices for agents interacting with long-running dev servers, and Astro 7's approach (run in background and have a logs command) seems like a good model.
    by AgentME
  • The switch to strict HTML compilation is just not cool, and actively prevents upgrading sites which need to deal with remote content that is not written in strict HTML.

    I also wish there could be a general purpose content processing API so I can plug a different format than markdown (such as typst)

    by microflash
  • this terrified me lol I'm on 5.1.x on most of my sites
    by BorisMelnik
  • This does not affect remote content, only the content written in .astro files. If you have remote content you'd use something like `set:html`: https://docs.astro.build/en/reference/directives-reference/#...

    See this example: https://stackblitz.com/edit/github-ug3paw61?file=src%2Fpages...

    by Princesseuh
  • "The .astro compiler has been rewritten in Rust.".

    I'm personally awaiting the rewrite to assembly.

    by keepupnow
  • Rust is so powerful it rewrites your code to assembly on-demand every time you compile ;)
    by wofo

Related stories