Live data from Hacker News

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

makojs.dev

111–120 of 215 posts

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

#111
post #41

[flagged]

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.

Hdmod (not the money grab hd edition) is a good nodernized version with lots of QoL, modding scene is active and there is also VCMI engine. All working fine

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

#112
post #48

This supports all kinds of non-platform-standard features that may tie your project to this specific bundler, but will tie them to bundlers in general. It would be much better to have projects that work without bundlers, that can use them as an optimization step.

Bundlers also tie clients to developers without them realizing. I work for a webhost and Many people still assume that if they have access to their hosting then they have their "source code". We see often that people migrate a sites after breaking ties with a developer only to find what they have may function, but is unmaintainable.

The same could be said for compilers, too. Deployed binaries and code have never been the "source" of your app.

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

#113
Can I kick it off programmatically inside a Cargo build via build.rs? I tried to go down this road with SWC and ... failed.

To be clear: I have JS/HTML artifacts in my repo alongside Rust source. I want to bundle them then ship them inside a produced Rust binary, or at least with it. With one build step using Cargo.

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

#114
post #103

Earlier quoted context omitted.

how’s esbuild? I’ve yet to hit something I had in webpack that isn’t a couple line plugin away from being present in esbuild

Intrestingly esbuild isn't included in their benchmarks. Esbuild is the only current build-tool that keeps one sane. The serve-mode is excellent and elegant with no brittle constantly breaking hacks like HMR or file watching. Sadly configuring especially the serve-mode is a bit badly documented, and not usable via CLI flags if one needs plugins.

To each their own. I can't imagine doing UI development without HMR anymore. Makes it so much faster to iterate.

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

#115
> NOTICE: Plugin system is still under development, and the API may change in the future.

Killer feature of vite is to leverage existing plugins system of roll up.

Do you have plans to build a compat layer for existing ecosystem?

Other build tools are doing it. Eg: rspack can use webpack plugins, farm can use vite plugin

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

#116
post #71

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…

Are you familiar with Java? If so, a web bundler is like a build tool which creates a single fat jar from all your source code and dependencies, so all you have to "deploy" is a single file... except the fat jar is just a (usually minified) js file (and sometimes other resources like a css output file that is the "bundled" version of multiple input CSS files, and other formats that "compile" to CSS, like SCSS [1] whi…

Thanks! I really appreciate the detailed explanation- makes a whole lot of sense.

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

#117

Argh name choice ... https://www.makotemplates.org/

A couple more:

https://wayland.emersion.fr/mako/

https://makoframework.com/

It can be hard sometimes to come up with names that aren't already in use. I think as long as it's clear in the description what it is, and the same name isn't shared for two projects that do approximately the same thing, maybe it's not so bad. There could also be an issue where command names might be the same so one would have to be changed. I recall this may have been a small issue when the Go language was new, as there was also a game of go available in some distro repositories. I believe that's generally solved now.

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

#118

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. P…

When you say dead code elimination, do you mean if I import some huge library just to use a single function, the bindler will shimmy things about so only the single function is being included in package and not the big library?

If so, that's amazingly helpful, I'm mostly over in python data land and I wish that existed for applications, although admittedly there's less need.

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

#119

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…

If you are also looking for broader context beyond what a bundler is, I have written a broader exposition on frontend builds here, which may be useful in understanding how bundlers compare to adjacent build tools: https://sunsetglow.net/posts/frontend-build-systems.html .

Thanks, that's actually exactly what I was after without realising it!

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

#120

Earlier quoted context omitted.

Nextjs is the trojan horse sent to destroy React and it worked

Is this how other people feel about NextJS? I've been trying to keep an open mind about it, but its entire design seems so antithetical to what I'm trying to accomplish. Is there a better mainstream alternative? From what I've seen NextJS is pretty commonly used.

The mainstream alternative is still to not have a "backend-for-the-frontend". If you use something like Rails, django, nodejs, use React connected to them. Or directly to something like supabase. NextJS is the extra complexity nobody needs.

It is marketed as the solution to slow starts but React is slow so the solution is terrible over-engineered.

A much better fix is to remove React and use something that is already fast like solidjs or Lit. There are much better UI Kits in Lit that I have seen in React and in the end it is just JS so the same people that can could React, can code Lit and SolidJS.

Post reply on HN