The Rust React Compiler is now native in Vite
Posted by acusti 4 days ago
Comments
Comment by pjmlp 3 days ago
Comment by adzm 4 days ago
Comment by adzm 4 days ago
Comment by Waterluvian 4 days ago
Comment by fishfasell 3 days ago
Comment by echelon 3 days ago
I'm going to start prototyping systems in Go, then porting them to Rust when they're more concrete.
I feel as though the Rust code LLMs emit is generally higher quality than most other languages, perhaps due to the error handling being a chief concern of the language, but the iteration on making changes and running tests is so slow.
Rust could grow into "the final language" if it wasn't so slow to compile. Assuming the WASM bridge also continues to improve.
Comment by throw-the-towel 3 days ago
Comment by echelon 3 days ago
My problem is that now iteration with LLMs is so quick when prototyping new things that I now spend an inordinate amount of time waiting on agents to compile Rust and run tests. It's a huge slow down.
I still want to serialize production logic to Rust (and TypeScript for the frontend as the WASM for frontend ecosystem isn't there yet), but it's really slow to iterate. I'm starting to build prototypes in Golang now and then convert them to Rust when I'm done.
Hopefully the Rust team makes strides over the coming years to address this. I know they have a lot of irons in the fire for many speedups.
Comment by umpalumpaaa 3 days ago
Comment by pjmlp 2 days ago
Comment by koito17 3 days ago
It's a bit mesmerizing to think that Vite at the time was still "that newish tool the Vue folk use", and now it's pretty much the standard bundler for web frontend. Also the easiest one to configure and use (in my experience).
Similarly, I'm glad I don't have to deal with karma, jest, etc. anymore.
Comment by torginus 3 days ago
I even had to revert from TS 7.0 (the go rewrite) to 6, because 7 doesn't support plugins and code analysis stuff (which I guess are js) in the way the tooling requires.
Comment by vmsp 4 days ago
Comment by nwienert 4 days ago
Comment by BretonForearm 4 days ago
Comment by francislavoie 4 days ago
Comment by throw_m239339 3 days ago
It's the definition of overengineering IMHO. The problem is React at first place. Some other frameworks have in theory no compilation or optimization step while delivering constant performance as the app grows, like SolidJS. Since writing a compiler in JS also make compilation itself slow, then the React compiler was re-written in Rust...
At the end of the day, React has a larger community and ecosystem so it's the industry "standard" for JS applications...
Comment by pzmarzly 3 days ago
Comment by syspec 4 days ago
Comment by ownagefool 4 days ago
Comment by dzonga 3 days ago
Comment by pjmlp 2 days ago
The golden age of scripting languages being used for applications have setted us back a few decades.
Comment by thephyber 3 days ago
But seriously, Python and JavaScript have reflection/introspection features. Once the investment was made to transcribe the entire language into a compiled language, the speed gains were obviously going to happen.
Comment by pjmlp 2 days ago
Comment by shikck200 3 days ago
Comment by onion2k 3 days ago
Imagine you wanted to make a native desktop app that runs on Windows (going back to Windows 95), and OSX, and Linux, and have it use the end users choice of native components, QT, or GTK. It also has to load fast, be accessible, and work on desktop, laptop, and phones. Also, you're only allowed to ship a single binary but you can load in assets based on the device when it runs.
The app could be anything from a single page that renders one image up to a complete 3D game. Users want 60FPS regardless of what it is.
I reckon you'd end up with a relatively complicated build pipeline.
That's what webdev is today.
Comment by shakna 3 days ago
Most of the jank of the modern platform doesn't come from JavaScript - it comes frame dependency hell, framework layered over framework, and over abstraction. It is a _cultural_ problem, rather than a technical one.
Comment by _bent 3 days ago
Comment by shikck200 3 days ago
Comment by onion2k 3 days ago
It's not React's fault that some devs don't know how to make a form in HTML. There is an argument that React doesn't spend much time telling people they might not need it, but that's not really their responsibility, plus there are some things (reactivity to other things on the page) that are common enough that seeing the boundary where you do or don't need it is actually quite hard.
Comment by slopinthebag 3 days ago
it's kind of the same for react. yes you could build one thing in vanilla js, another thing with htmx, and then a third in react. or just build all three in react and be done with it.
modern web dev is actually pretty simple now, there is still a stigma around webdev from the olden days but spinning up vite + react is trivial, doesn't pull a ton of dependencies, and makes it easy to build anything you want. yes you can still overcomplicate it massively but that's on the dev at that point.
Comment by mexicocitinluez 3 days ago
Comment by shikck200 1 day ago
But now we have abstractions upon abstraction, slow ands heavy solutions for almost every thing.
Software is slower than ever, not because of hardware, but because of the endless bloat and abstraction every framework brings.
Comment by satvikpendem 3 days ago
Comment by rjzzleep 1 day ago
What should happen is that we take the lessons that we learned from this current iteration of the web and desktop and turn it into a new generation while cutting out the crap we don't need.
Comment by satvikpendem 1 day ago
Comment by throw_m239339 3 days ago
Comment by satvikpendem 3 days ago
Comment by throw_m239339 3 days ago
Comment by yugoslavia4ever 3 days ago
Comment by slopinthebag 3 days ago
if anything the migration of all these tools to rust makes things way less complicated. you have a binary for compiling your react code (totally optional btw, it's a performance optimisation), a cli for building your app (vite, built on a rust binary basically), and react itself which is virtually dependency free. where is the over engineering here?
Comment by Onavo 4 days ago
Comment by crypto137 4 days ago
Comment by mexicocitinluez 4 days ago
Comment by Buoylog 4 days ago
Comment by prettycool 4 days ago
Comment by glouwbug 4 days ago
Comment by VertanaNinjai 4 days ago
Comment by chmod775 4 days ago
Comment by ablob 4 days ago
I believe that one does not need to be overly concerned here. As with most things you will never satisfy zealots so it is sufficient to reconsider every once in a while when the status quo changed enough to warrant the effort (i.e. the actual arguments change).
It is always a choice to participate in these "culture wars" or whatever you want to call this. If you can stick to a decision you can limit the impact quite a bit, I've come to realize.
Comment by anp 4 days ago
Comment by MBCook 4 days ago
Comment by steveklabnik 4 days ago
They'll move on to whatever the next meme is.
Comment by wldcordeiro 4 days ago
Comment by twistedpalm 3 days ago
Comment by dhbradshaw 4 days ago
Comment by Svoka 4 days ago
For me last nail into becoming part of the crowd was Embassy. Whole my life I wrote some ad-hoc C microcontroller stuff. But just learning Embassy I realized that it could've been done much more elegantly and securely. If you have a spare moment, I would watch videos in this channel, old to new:
Comment by dhbradshaw 4 days ago
Moonbit is pretty cool too so I thought I'd mention it for other people who like cool things.