Re:Rolldown: Rollup compatible bundler written in Rust
by cAtte_ on Friday March 08, 2024 @10:20AM
(#39641825)
note that esbuild is written in go, not rust
[ Parent
| on HN ]
Re:Rolldown: Rollup compatible bundler written in Rust
by sondr3 on Friday March 08, 2024 @11:28AM
(#39642675)
Yep, forgot to mention that in my post, thanks.
Re:Rolldown: Rollup compatible bundler written in Rust
by dunham on Friday March 08, 2024 @04:37PM
(#39646798)
Also, it was originally written in both Go and Rust, and the author decided to continue in Go. Both are fine languages, but it makes an interesting case study:
Re:Rolldown: Rollup compatible bundler written in Rust
by pcthrowaway on Sunday March 10, 2024 @02:19PM
(#39661247)
Wow, thank you for sharing this. The author echoes a lot of thoughts I've had working with rust.
However, doesn't the explanation given for why the Go version was 10% faster mean that esbuild was built to take advantage of a fixed number of cores rather than all of them? Sorry if this is a dumb question, I'm not really that experienced with parallel computation
Re:Rolldown: Rollup compatible bundler written in Rust
by dunham on Sunday March 10, 2024 @11:07PM
(#39664586)
I'm not sure. From the description, it sounds like whatever rust does on one thread (compute + destructors) is split across multiple threads in Go (compute + gc), but it's not clear if the base computation workload is spread across multiple threads.
Thinking about the problem, I think that at the very least parsing could be parallelized. Assembling everything into one output might not be parallelizable. But I haven't looked at what happens in esbuild.
I do know that it's fast enough that when I switched from webpack I had to check that it actually did something, because it returned immediately.