Live data from Hacker News

The Rust React Compiler is now native in Vite

blog.master.dev

51–60 of 62 posts

Re: The Rust React Compiler is now native in Vite

#51

What's a react compiler? Not JS or TS?

Hand written React code is relatively slow when running so the React team made a React compiler to make it run faster. You might not see the difference with a toy app, but with a fairly large app, with a lot of IO it's a catastrophe if not compiled and optimized. 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 w…

Why do people say SolidJS has no compilation? SolidJS 1.0 was already doing much more at transpilation time than just changing to h("h1"), and SolidJS 2.0 has a package called @solidjs/compiler: https://npmx.dev/package/@solidjs/compiler

Re: The Rust React Compiler is now native in Vite

#52
post #39

Earlier quoted context omitted.

I just wish Rust itself compiled faster. Serde, proc macros, it's all so slow. 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 c…

LLMs being good with Rust makes sense, because the language itself gives you more safeguards than many others. What's good for the (human) gander is good for the (agent) goose.

LLMs are ungodly good at Rust, and I say this as a 10-year veteran of the language.

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.

Re: The Rust React Compiler is now native in Vite

#53

Earlier quoted context omitted.

Hand written React code is relatively slow when running so the React team made a React compiler to make it run faster. You might not see the difference with a toy app, but with a fairly large app, with a lot of IO it's a catastrophe if not compiled and optimized. 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 w…

Why do people say SolidJS has no compilation? SolidJS 1.0 was already doing much more at transpilation time than just changing to h("h1"), and SolidJS 2.0 has a package called @solidjs/compiler: https://npmx.dev/package/@solidjs/compiler

[deleted]

Re: The Rust React Compiler is now native in Vite

#54

Earlier quoted context omitted.

Improving speed is now overengineering apparently, but the same people would complain about how horrible web dev is if it weren't improved. Damned if you do, damned if you don't.

But bad performances stems from non compiler optimized React to begin with, its execution model when handwritten. Other frameworks don't necessarily take more effort to use and have better performances from the get go.

A lot of them do have compilers too, like a couple of the most commonly cited React alternatives, Svelte and Solid, so I'm not sure why React specifically is singled out.

Re: The Rust React Compiler is now native in Vite

#55
post #39

Earlier quoted context omitted.

I just wish Rust itself compiled faster. Serde, proc macros, it's all so slow. 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 c…

LLMs being good with Rust makes sense, because the language itself gives you more safeguards than many others. What's good for the (human) gander is good for the (agent) goose.

But once you start to close the loop (as in allowing the LLM to build and run its changes) what’s good turns suddenly bad again. Long build times also increase LLM turnaround times. Especially bad when you have a fast model.

Re: The Rust React Compiler is now native in Vite

#56
post #47

rewrite it in rust might be a joke -- but damn most the massive improvements in dynamic language toolchains have come from the toolchains being rewritten in rust - Python, JS

Now we rewrite the web in Rust WASM. /s

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.

Re: The Rust React Compiler is now native in Vite

#57

Earlier quoted context omitted.

It’s just the best thing ever. Compiling at work took a minute for full builds with babel, and with rsbuild it now takes about 0.9 seconds.

Rust is such an awesome language. The execution times are blazing fast.

Quite surprising for an ahead of time compiled language. /s

Re: The Rust React Compiler is now native in Vite

#58
post #47

rewrite it in rust might be a joke -- but damn most the massive improvements in dynamic language toolchains have come from the toolchains being rewritten in rust - Python, JS

They are only surprising for anyone that never used any ahead of time compiled language since FORTRAN was introduced.

The golden age of scripting languages being used for applications have setted us back a few decades.

Re: The Rust React Compiler is now native in Vite

#59
post #47

rewrite it in rust might be a joke -- but damn most the massive improvements in dynamic language toolchains have come from the toolchains being rewritten in rust - Python, JS

Now we rewrite the web in Rust WASM. /s 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.

They also exist in compiled languages without the performance impact of scripting languages.

Re: The Rust React Compiler is now native in Vite

#60

Webdev is the pinnacle of over engineering. And now with AI, it will get even worse. I think the web truly needs a reset.

Improving speed is now overengineering apparently, but the same people would complain about how horrible web dev is if it weren't improved. Damned if you do, damned if you don't.

It's layers upon layers of indirection and then massive layers of optimization on top of it.

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.

Post reply on HN