Live data from Hacker News

Mako – fast, production-grade web bundler based on Rust

makojs.dev

61–70 of 215 posts

Re: Mako – fast, production-grade web bundler based on Rust

#61

I don't work in web, and possibly live under a rock. I'm a little confused around what bundlers actually do? I'd sort of assumed it was a typescript build thing before, but Mako's page gives me enough info to make me realise I'm wrong, but seems to assume people are working with some base knowledge I don't have. Any pointers to information of exactly what bundlers do? The emphasis on speed makes it sound like it's do…

Bundlers take many - usually at least hundreds, often tens of thousands - individual source files (modules) and combine them into one or few files. During that, they also perform minification, dead code elimination and tree shaking (removal of unused module exports).

It's orthogonal to TypeScript - bundler will invoke a TS compiler during the process and also functions as a dev server, but that's just for nicer DX.

Package version resolution is done by package manager, not bundler.

Re: Mako – fast, production-grade web bundler based on Rust

#62
post #25
post #17

Everyone is making the point that using JavaScript on the server was a BIG mistake, with this ongoing rewrites. We already had our bundlers in Java and .NET land, before nodejs came to be, and life was good.

Having the same language on the client and on the server is a huge productivity booster for me. I can’t imagine writing so many things twice again. Have you tried it?

It’s not necessary to use the same language for that.

In many cases you can achieve the same with a clearer separation, with data driven methods and by generally not running so much JS.

The typical example is input validation. You want immediate feedback on the client, but obviously you validate on the server.

But instead of running literally the same specific code twice, you can use json-schema or your own general data description of what valid input is. You move the specifics from code into data.

Re: Mako – fast, production-grade web bundler based on Rust

#63
post #42

The old joke is that there's a new JavaScript framework every month. That's not really true — we've had the same big three for a decade — but there has been an explosion of new bundlers: vite, esbuild, turbopack, farm, swc, rome/biome, rspack, rolldown, mako. And of course plenty of projects are still using rollup and webpack. Some competition is a good thing, and it seems to have led to a drive for performance in al…

> The old joke is that there's a new JavaScript framework every month. That's not really true — we've had the same big three for a decade Yup. I know a few people who were using React 10 years ago and still use it today. What has changed frequently is the tooling. e.g. Bower going away in favor of NPM; Gulp/Grunt going away in favor of Webpack, which is slowly going away in favor of Vite; CoffeeScript going away in f…

> ClojureScript has a great deal of stability in both the language itself and tooling

Does it still use Google's Closure (they've chosen it just for the name, right?) compiler? Is that still supported by Google?

Re: Mako – fast, production-grade web bundler based on Rust

#64
post #41

Earlier quoted context omitted.

Now that's a game I wouldn't mind a rewrite of. Imagine Heroes 3 with a modern engine and modding available out of the box instead of people having to reverse engineer it just to keep it alive today.

Exported in WASM to play directly in the browser, including Horn of the Abyss. I would pay for this. You'd probably have to redo the art though, since 3DO will unlikely do this port and I doubt they would licence the IP.

> I doubt they would licence the IP

But would they go after you for using it.

Re: Mako – fast, production-grade web bundler based on Rust

#65

Can't people figure out some other tooling besides bundlers? I mean, how many do we really need? It's probably fine, but so are all the others as well. The authors have probably spent a fair amount on time on this project so I don't want to be negative but it's just hard to be excited when it brings nothing new to the table. Why should I use this over Vite or esbuild? Because it's written in Rust? I don't understand…

You'll get downvoted but I completely agree, it seems rewriting things in Rust and tinkering with bundlers is the new in-vogue thing to do. Lord knows why

I didn't enjoy the Rust hype on here in years past, but I'm always glad of any better tooling. Just an example from the other week... I swapped out NVM for FNM (Rust) and now I don't have to put up with performance issues, especially slow shell startup times.

Re: Mako – fast, production-grade web bundler based on Rust

#66

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.

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

#67

I don't work in web, and possibly live under a rock. I'm a little confused around what bundlers actually do? I'd sort of assumed it was a typescript build thing before, but Mako's page gives me enough info to make me realise I'm wrong, but seems to assume people are working with some base knowledge I don't have. Any pointers to information of exactly what bundlers do? The emphasis on speed makes it sound like it's do…

I've always liked the analogy of a compiler/linker for web assets, personally.

Re: Mako – fast, production-grade web bundler based on Rust

#68
post #29

What happens when we reach the tip of bundling? Once you're in ms territory (like esbuild is), then what are the really creative things you can do if say every browser had a little WASM mako or some bundler in it? It's very cool though and seems like a lot of effort went into this.

It's in the ms for a small projects. These improvements are not to shave a couple ms off some small codebase, but would shave seconds off of really large projects. The codebase I'm working on right now isn't really large, about 5 years of development with on average 2-3 developers working on it and in vite (esbuild) the build time is 20.78 seconds on my M1 MBP. This project claims to be twice as fast as vite, so it would shave off 10 seconds, that's a significant gain. It would probably have a nice impact on our CI/CD pipeline, if the benchmark is representative of real world codebases.

Re: Mako – fast, production-grade web bundler based on Rust

#69

Earlier quoted context omitted.

You'll get downvoted but I completely agree, it seems rewriting things in Rust and tinkering with bundlers is the new in-vogue thing to do. Lord knows why

I didn't enjoy the Rust hype on here in years past, but I'm always glad of any better tooling. Just an example from the other week... I swapped out NVM for FNM (Rust) and now I don't have to put up with performance issues, especially slow shell startup times.

Just me being curious since I have used nvm for years without any issues. What do you mean by slow shell startup times? In what way do you use nvm in order to experience any slowness?

Re: Mako – fast, production-grade web bundler based on Rust

#70

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.

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.
Post reply on HN