Rsbuild – A Better Vite?

(rsbuild.dev)

72 points | by synergy20 9 months ago ago

61 comments

  • blixt 9 months ago

    It is easy to get JS build fatigue. But I love the fact that these competitors push the incumbents forward. SWC was one of the earlier Rust builders, which then became absorbed into Vercel and turned into Turbopack (is my understanding), and then we have Rome which turned into a Rust rewrite as Biome (though they are barely at the level of compilation), and the Vite team seems to be making progress as fast as their HMR system, with Vite 6 already looking quite impressive with its stack of open and modular Rust-based AST parser/compiler/linter (Oxc, originally another solo project like SWC) all the way up to the Rolldown bundler.

    I'm curious to see what Rsbuild brings on top of this already very competitive space of Rust-based builders (and I haven't even mentioned the fantastic non-Rust ones like ESBuild!)

    I would personally bet on Vite at this time because it's the most complete package with the most momentum, and it's already hit some of the best speeds out there. Plus I am really rooting for a Rust-based package that compiles well as WASM because I am very inclined towards projects that do a lot of code analysis/compilation in the browser.

    • tomphoolery 9 months ago

      > SWC was one of the earlier Rust builders, which then became absorbed into Vercel and turned into Turbopack (is my understanding)

      SWC and Turbopack aren't related in the sense that one is the "successor" of the other. They both do different things, and compliment each other. SWC is more lower-level, it's a compiler for JS (and other web tools) that converts your syntax into something any browser can understand. Turbopack is a bundler, it takes that compiled code and minifies/concatenates it together in various ways so it can be distributed to a browser efficiently. I believe Turbopack does in fact use SWC (if you're using Next that is) to do the "dirty" work of compiling TypeScript code into JavaScript quickly, but its main feature is the use of the Turbo engine to cache function calls at a very low level. From what I read, Turbopack's potential to make building JS apps incredibly efficient should be a really neat thing to work with in the future!

      • blixt 9 months ago

        Ah gotcha, yeah I was always a bit confused about the whole thing but that makes sense. I've only used SWC directly as a WASM bundle to do in-browser realtime compilation and analysis of .tsx files, which works great, but that was pre-Vercel times when only 강동윤 was working on it.

  • stickfigure 9 months ago

    <checks watch> oh, I see, it's time to rewrite my javascript builds again. My how the time flies.

    • miffy900 9 months ago

      It's supposed to be webpack plugin-and-API compatible, so if you already use webpack, hopefully not (much).

      But is this constant turnover getting ridiculous in the web dev & JS ecosystem?

      Yes. I simultaneously credit and blame facebook for starting it with yarn; after yarn, the trend of re-writing build tools seemed to become much more acceptable and trendy, especially since yarn (at the time) was multiple times faster than npm; you could argue it was worth it. But now we've reached a stage where the diversity of tools like npm, yarn and pnpm, now tools like ni (https://github.com/antfu-collective/ni) are emerging to manage the diversity.

      I think this is getting out of hand, now there are n+1 of them.

      • arp242 9 months ago

        > But is this constant turnover getting ridiculous in the web dev & JS ecosystem?

        I call this the "JavaScript treadmill", where everything that's more than two years old is garbage written by nincompoops, but now we all got it right and now everything is fantastic, and the only people who criticize it are grumpy crusty old backend boomers too lazy to learn anything new.

        If you go back in time two years, people said the same thing. And four years, and six years, etc.

    • throwup238 9 months ago

      I always set aside a day of the month for “JS Bullshit” to take care of the churn. It’s a flex day that can be rolled over from month to month and moved around to address emergencies, but an average of one JS Bullshit day a month is an inevitable fact of the universe.

      • codethief 9 months ago

        Only one day per month? My god, just this week I have already spent two, and I have a couple more bugs in our toolchain to analyze and report.

    • synergy20 9 months ago

      it's straightforward to migrate from vite per the doc

  • dcre 9 months ago

    The better, faster, Rust-powered Vite is… Vite.

    https://voidzero.dev/posts/announcing-voidzero-inc

    • mgoetzke 9 months ago

      I always wonder, looking at this from Europe, how " We have raised $4.6 million in seed funding, led by Accel." even happens in the US.

      Who is giving that much money to an obscure build tool ? What is the monetization plan ? How are they ever trying to earn the money back ?

      Does this happen in any way or form outside the US ?

      • scotty79 9 months ago

        I think the reason it's a thing is the same as the reason Hollywood exists and Las Vegas exists. Overabundance of inhumanely rich idiots that are bored and want to gamble. And they do because they falsly believe they have an edge in their bets due to their secret knowledge of the game and unique talent in picking the right horses. Most of them will lose most of their bets. But a handful of wins is more than enough to write about to draw in next batch of idiots or even the same idiots again if they still have money to lose.

      • aeze 9 months ago

        I saw a video a few weeks ago where an individual involved in an VC-backed open source project (SST) spoke about this topic for a while.

        https://www.youtube.com/watch?v=E-w0R-leDMc - starts about halfway through.

      • throw4950sh06 9 months ago

        The real answer is that this is not a lot of money in the US.

        • mgoetzke 9 months ago

          In Europe it certainly is. Try to find an investor for this kind of money for an open source dev tool or anything really

          • throw4950sh06 9 months ago

            Yes, I know. But in the US this is not considered a lot of money - they actually got considerably less money they could've gotten if these founders had a product in another market. And, making the money back in the US market is easy - this is really not a lot; just 5-10 senior engineer yearly wages...

      • sph 9 months ago

        The lower the interest rate, the sillier the investments.

        The goal nowadays for these kind of tools is to get bought out by platforms such as Vercel/Fly/etc. or to become a platform of their own. Given that devs these days are afraid if not unable to deploy a React website on a VPS by themselves, it's become a self-sustaining lifecycle.

        This tends to be a particularly US phenomenon. It's a house of cards waiting for the next shaky economic phase.

      • Cthulhu_ 9 months ago

        Every build tool was obscure at some point. A common monetization plan for these is cloud services (promising faster builds and such) with usage-based plans. A few enterprises may use these services over time; for one project I'm at they're considering e.g. Expo and its cloud / CI offerings, because spinning up and configuring your own Mac machines in the cloud is painful and expensive.

    • Aeolun 9 months ago

      It doesn’t matter to me unless it’s actually available for me to use.

    • hughes 9 months ago

      The axis label on the chart is very strange.

  • JasonSage 9 months ago

    I think it’s more accurate to call title this “… - A Better Webpack?”

    It’s a build tool that swaps an underlying Webpack process with a Rust-powered process which aims to be API-compatible. With the Webpack ecosystem.

    The Vite developers are working on the analogous Vite replacement, which is an API-compatible Rust rewrite of Rollup: https://rolldown.rs/

    • throw4950sh06 9 months ago

      Rollup/rolldown is a component of Vite, not full replacement

      • JasonSage 9 months ago

        By "Vite replacement" I mean "replacement in Vite". My wording was ambiguous, it can mean either.

  • croes 9 months ago

    According to them it’s about webpack not vite.

    https://rsbuild.dev/community/releases/v1-0

    And 30ms slower as vite at hmr is totally ruining my DX

  • BiteCode_dev 9 months ago

    Their own home page says their Hot reload on RSBuild is slower than Vite's.

    Since I don't care if my build takes 1 second more (per their benchmark again), but I do care very much that the page refreshes faster when I do an edit, it's a hard sell.

    • Sammi 9 months ago

      I love Vite and I use Vite, but come on man, the values you are comparing are 50 ms vs 80 ms. They're the same from a practical standpoint.

  • gnabgib 9 months ago

    Title & H1: Rsbuild

    Got a fair bit of attention 44 days ago (25 points) https://news.ycombinator.com/item?id=41502473

  • STRiDEX 9 months ago

    If you use webpack and haven't looked into rspack you should! Can drop it in and speed up large webpack apps, currently investigating it at Sentry.

    • drcongo 9 months ago

      I tried it yesterday after a commenter on HN mentioned it, I'm not a front end dev but I still hate how slow and seemingly fragile webpack is. I dropped rspack into a couple of projects and instantly got a 3x speedup with identical output. I love it. Also, apparently it's pronounced "arse pack", what's not to like.

    • whazor 9 months ago

      This! It is backwards compatible with many of the older webpack plugins. This makes a migration easier. For me a complete build was 3x as fast.

  • rk06 9 months ago

    “- A Better Vite?” is not part of the original title. Is that okay?

    • saurik 9 months ago

      My favorite part is the question mark you left off of your quote ;P.

      • rk06 9 months ago

        Good catch. Updated the comment!

  • donatj 9 months ago

    In the past two years I have gone Webpack -> Parcel -> Webpack -> Vite -> Rollup

    I live for the day bundlers are no longer needed.

    The state of modern JS such that much of it does not work on the web by default is absurd.

    All the work that's been spent building better and better bundlers would have been better spent fixing the blight that Node, CJS and the death of Bower caused to begin with.

    How we ended up in a place where most JS is server-first and needs to be adapted for the web is beyond me.

    • conradfr 9 months ago

      Most JS can't be server side.

      • Zanfa 9 months ago

        Sure it can. Just because somebody's decided to write a SPA CRUD app doesn't mean that the same couldn't be done on the server (whether Node or something else).

        • conradfr 9 months ago

          Won't most Node apps still have client side JavaScript?

          • Zanfa 9 months ago

            Some, sure. But the amount that a typical SPA CRUD app has? Not even close.

            I know it probably comes down to devs starting out with React and then thinking that that's how hard webdev is supposed to be. But the reality is that the vast majority of apps don't need to be SPAs with Reacts/Formiks/Flux-derivatives/Routers and would be faster to develop, offer better UX and have a single digit fraction of the boilerplate code to do the equivalent.

    • Hamuko 9 months ago

      I still have some old projects on Bower and I'm not sure what could make me find the energy to update them – especially since the JavaScript community will coalesce around something else in a few months anyways.

    • gherkinnn 9 months ago

      https://world.hey.com/dhh/you-can-t-get-faster-than-no-build...

      There is always the option of not building.

      • incrudible 9 months ago

        > not building is faster

        Maybe if your goal is to minimize build times, but my goal is minimizing iteration times. With a decent build tool, it is much faster to bundle up a bunch of JS files and serve them as a single file rather than letting the browser (or even node) figure that out. This is also my peeve about the vite dev server (that makes individual requests for each source file), which is slower on a full reload than plain esbuild.

      • donatj 9 months ago

        Oh I'd love to, and I did for years.

        The problem is using 99% of third party libraries without building has become nearly impossible.

  • steve_adams_86 9 months ago

    Interesting, it’s by a team from ByteDance. It all appears to be under the MIT license.

  • anonzzzies 9 months ago

    Ah another weekly bundler/build thing. What a miserable life in the frontend world. Please stop this.

  • wg0 9 months ago

    RDD - "Rust driven development".

  • nprateem 9 months ago

    Just added my first preact to my django site after alpine couldn't cut it. I consciously avoid anything needing the js build nonsense. So far so good.

  • Aeolun 9 months ago

    I think this is the better Webpack right? The better Vite is called Farm.

    To be fair, both are improvements over the existing tools, if not entirely compatible.

    • synergy20 9 months ago

      rspack for webpack,rsbuild for vite

  • jaequery 9 months ago

    I can't wait for Deno to get rid of all these bundlers

  • aliasxneo 9 months ago

    I clicked the link and had a weird experience. Sort of a cold, solemn spirit overcame me as I was, once again, presented with a landing page complete with three to six prominently displayed buzzwords. Perhaps even deja vu, a la Groundhog Day, where I've been subjected to this same thing, over and over again. Framework. Rust. Javascript.

    • floydnoel 9 months ago

      whoa, did rust absorb the churn-loving former js devs?

      • IgorPartola 9 months ago

        Seems so. Have you seen all the “[trivial tool we have had for decades] written in Rust” headlines on HN lately? It’s not all terrible but also it’s a lot of people discovering how things work for the first time.

  • WesolyKubeczek 9 months ago

    I tried rsbuild recently to upgrade from webpack. It panicked.

    So I just went middle ground and ditched Babel for swc.

  • floydnoel 9 months ago

    does it have any Vite compatibility? or just webpack?

  • brtknr 9 months ago

    Copyright ByteDance? Ouch

  • baxuz 9 months ago

    stop

  • fourseventy 9 months ago

    Just what the world needs, another javascript bundler.

  • auggierose 9 months ago

    It's from ByteDance.