News for hackers. Stuff that matters.
Re:Why Rust? by maeln on Tuesday October 18, 2022 @09:40AM (#33246949)
> People doing frontend dev don't want to bother with slow compile time

Honestly, with my previous experience as a frontend web, compile time for frontend is starting to become as bad as a standard compiled language. When you start to have a whole framework, many (many!) dependencies (you know, the kind that make just deleting the node_modules directory slow) and webpack with some plugins for CSS, es-lint and all that, the tooling just can't keep up. It doesn't help that much of the tooling is also done in JS which is fast but not that fast.

Re:Why Rust? by littlestymaar on Tuesday October 18, 2022 @09:43AM (#33247005)
Yeah, this is really an instance of “tell me that you're not doing front end while not telling me you're not doing front end”. Build time are a really annoying part of modern web jobs…
Re:Why Rust? by 5e92cb50239222b on Tuesday October 18, 2022 @12:38PM (#33250143)
It's pretty fast with modern tooling. Try vite or swc if you have the time and inclination. vite builds one of my large $DAYJOB projects in ~45 seconds (which is insane compared to how webpack performed).

If you don't need vite's extensibility, you can go with 'pure' esbuild and slim down transpilation + minification + bundling to only a few seconds.

https://vitejs.dev

https://github.com/swc-project/swc

https://github.com/evanw/esbuild

Re:Why Rust? by toyg on Wednesday October 19, 2022 @09:28AM (#33261820)
When JS was born, "building" was F5 in a browser. 45 seconds is an eternity in comparison.
Re:Why Rust? by 5e92cb50239222b on Thursday October 20, 2022 @02:34PM (#33278795)
You also couldn't use JS of that time to build anything remotely like modern SPAs. Unlike some Silicon Valley unicorns, we're using SPAs only where they fit, to replace legacy desktop applications. (It's boring intranet stuff, but they make a lot of sense there.) I was a skeptic initially, but it grew on me.