Hacker News new | past | comments | ask | show | jobs | submit login
Rsbuild – A Better Vite? (rsbuild.dev)
72 points by synergy20 4 months ago | hide | past | favorite | 60 comments



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.


> 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!


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.


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


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.


> 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.


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.


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.


it's straightforward to migrate from vite per the doc


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

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


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 ?


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.


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.


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


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


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...


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.


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.


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


The axis label on the chart is very strange.


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/


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


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


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


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.


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.


This just benchmarks a small "hello world"-type demo app[1]. With larger apps it can become 500ms vs 800ms, or 1 second vs. 1.6 seconds. It's not really a very useful benchmark.

[1]: https://github.com/rspack-contrib/performance-compare


Title & H1: Rsbuild

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


strange that this link wasn't used, i guess: https://rsbuild.dev/community/releases/v1-0


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.


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.


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.


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


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


Good catch. Updated the comment!


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.


Most JS can't be server side.


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).


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


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.


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.


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

There is always the option of not building.


> 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.


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.


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


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


RDD - "Rust driven development".


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.


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.


rspack for webpack,rsbuild for vite


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


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.


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


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.


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

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


does it have any Vite compatibility? or just webpack?


Copyright ByteDance? Ouch


stop


Just what the world needs, another javascript bundler.


It's from ByteDance.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: