Rsbuild – A Better Vite?
46 comments
·October 25, 2024blixt
tomphoolery
> 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
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.
dcre
The better, faster, Rust-powered Vite is… Vite.
mgoetzke
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 ?
sph
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.
Aeolun
It doesn’t matter to me unless it’s actually available for me to use.
hughes
The axis label on the chart is very strange.
stickfigure
<checks watch> oh, I see, it's time to rewrite my javascript builds again. My how the time flies.
miffy900
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.
throwup238
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
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
it's straightforward to migrate from vite per the doc
JasonSage
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/
BiteCode_dev
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.
croes
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
justkidding8
[dead]
donatj
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
Most JS can't be server side.
gherkinnn
https://world.hey.com/dhh/you-can-t-get-faster-than-no-build...
There is always the option of not building.
incrudible
> 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.
Hamuko
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.
STRiDEX
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.
rk06
“- A Better Vite?” is not part of the original title. Is that okay?
gnabgib
Title & H1: Rsbuild
Got a fair bit of attention 44 days ago (25 points) https://news.ycombinator.com/item?id=41502473
floydnoel
strange that this link wasn't used, i guess: https://rsbuild.dev/community/releases/v1-0
steve_adams_86
Interesting, it’s by a team from ByteDance. It all appears to be under the MIT license.
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.