Re:Mako – fast, production-grade web bundler based on Rust
by phplovesong on Tuesday July 02, 2024 @01:58AM
(#40853902)
How does it compare to esbuild or swc? Its good we have alternatives, and im still mentally scarred from the javascript ecosystem, where almost everything is slow and buggy. But when you compare to an already native tool (like esbuild) you start getting diminishing returns.
[ Parent
| on HN ]
Re:Mako – fast, production-grade web bundler based on Rust
by yuzuquat on Tuesday July 02, 2024 @02:38AM
(#40854076)
looking at the docs, this uses swc under the hood
Re:Mako – fast, production-grade web bundler based on Rust
by throwAGIway on Tuesday July 02, 2024 @05:41AM
(#40854941)
SWC doesn't bundle at all. Esbuild is a pretty good bundler but works well only if your code and dependencies use ESM, it's not as good as other options with CommonJS.
Re:Mako – fast, production-grade web bundler based on Rust
by oefrha on Tuesday July 02, 2024 @06:44AM
(#40855292)
That’s not the biggest problem of esbuild. Esbuild has poor support for code splitting (it’s the first priority on their roadmap[1]) and limited plugin interface which makes it a poor choice for complex projects. These are the reasons that Vite for instance can’t use esbuild for production builds.
While I haven’t tried Mako, it seems to have support for advanced code splitting[2]. No idea how powerful its plugin system is.
Re:Mako – fast, production-grade web bundler based on Rust
by kurtextrem on Tuesday July 02, 2024 @10:32AM
(#40857079)
Also, the vite team in collab with a few others is building https://rolldown.rs/, to replace esbuild and rollup in vite. It's goal is to be faster than esbuild, with extended chunking options and so on.
Re:Mako – fast, production-grade web bundler based on Rust
by mikojan on Wednesday July 03, 2024 @06:07AM
(#40864482)
> Esbuild [...] works well only if your code and dependencies use ESM
I cannot attest to that. We are using Esbuild plus CJS at $DAYJOB no problem. Why would that be an issue?
Re:Mako – fast, production-grade web bundler based on Rust
by throwAGIway on Wednesday July 03, 2024 @07:13AM
(#40864829)
It's an issue because CommonJS allows stuff that's forbidden in static ESM imports/exports, and it was normal to use. Newer code is usually fine, but there are many older backend libraries that can cause issues with Esbuild. Webpack had to learn how to deal with it because it existed at the time CommonJS was most popular, Esbuild didn't.
Re:Mako – fast, production-grade web bundler based on Rust
by tinco on Tuesday July 02, 2024 @06:07AM
(#40855092)
This is built on swc, and they compare themselves to vite, which is built on esbuild. So the answer to your question is that they claim to be roughly twice as fast as esbuild (-based bundlers) in the benchmark in this article.
Re:Mako – fast, production-grade web bundler based on Rust
by kurtextrem on Tuesday July 02, 2024 @10:30AM
(#40857064)
I'm not entirely sure if we can really tell anything about esbuild from that comparison, as vite's production build time is 1300ms (which uses rollup), but dev startup time 1100 (uses esbuild to prebundle). It seems like vite itself has overhead.
The only bench I'm aware of was presented in November 2023: https://x.com/boshen_c/status/1719596594985681275?t=x8FaB9Aw..., where esbuild was faster.
Re:Mako – fast, production-grade web bundler based on Rust
by megaman821 on Tuesday July 02, 2024 @10:46AM
(#40857220)
...or Turbopack or RSpack or Rolldown? Too many choices. I will be sitting this round out until a winner emerges.
Re:Mako – fast, production-grade web bundler based on Rust
by pshu on Tuesday July 02, 2024 @11:20AM
(#40857525)
according the current situation in bundlers written in JS,there is no "really" winner in my opinion。 webpack or rullup,which one is winner is a very personal thought。
So i think there maybe some similar situation in bundlers written in Rust.
Re:Mako – fast, production-grade web bundler based on Rust
by satvikpendem on Tuesday July 02, 2024 @11:58AM
(#40857903)
Are you Japanese? Those period symbols are interesting.
Re:Mako – fast, production-grade web bundler based on Rust
by pshu on Tuesday July 02, 2024 @12:02PM
(#40857939)
'。' is a Chinese full stop, equivalent to a period in English
Re:Mako – fast, production-grade web bundler based on Rust
by satvikpendem on Tuesday July 02, 2024 @05:09PM
(#40860442)
Ah that's cool. So it includes spacing inherently in the character it looks like, rather than English's ". " which are two characters.
Re:Mako – fast, production-grade web bundler based on Rust
by 8n4vidtmkvmk on Tuesday July 02, 2024 @07:54PM
(#40861579)
Wepack for web apps, rollup for libraries.
Very much depends on what you're doing, the tools usually aren't good at all of them. There's 1 or 2 other use cases I'm forgetting.