Mako – fast, production-grade web bundler based on Rust
Mako, a Rust-based front-end build tool, is now open-source, aiming to enhance build speed. Tested at Ant Group, it surpasses Webpack in speed, especially with React Server Components, offering an SSU feature. Users can engage via WeChat, Telegram, or RSS, contribute to development, and join support services.
Read original articleMako, a front-end build tool based on Rust, has been officially open-sourced. Developed to address build speed issues, Mako is labeled as "extremely fast" and "production-grade." It has been extensively tested and validated internally at Ant Group across various projects and platforms. The project was initiated in 2023, with a focus on exploring faster build speed solutions through Rust. Mako boasts significant speed improvements compared to Webpack, especially on projects utilizing React Server Components (RSC). Additionally, Mako offers an experimental SSU feature for enhanced performance. To get involved, users can create Mako projects easily and participate in discussions via WeChat, Telegram, or RSS. Contributions to Mako's open-source development are encouraged, with opportunities to join developer groups and receive support services. A live Q&A session is scheduled for June 28, 2024, welcoming questions about Mako. The release of Mako acknowledges the contributions of various individuals and community dependencies that have supported its development.
Related
Farm: Fast vite compatible build tool written in Rust
Farm is a Rust-based web building engine for efficient web programming. It accelerates React/Vue projects with fast updates, incremental building, module-level caching, and support for popular technologies like Sass, Less, Vue, and React.
Exposition of Front End Build Systems
Frontend build systems are crucial in web development, involving transpilation, bundling, and minification steps. Tools like Babel and Webpack optimize code for performance and developer experience. Various bundlers like Webpack, Rollup, Parcel, esbuild, and Turbopack are compared for features and performance.
Homegrown Rendering with Rust
Embark Studios develops a creative platform for user-generated content, emphasizing gameplay over graphics. They leverage Rust for 3D rendering, introducing the experimental "kajiya" renderer for learning purposes. The team aims to simplify rendering for user-generated content, utilizing Vulkan API and Rust's versatility for GPU programming. They seek to enhance Rust's ecosystem for GPU programming.
Show HN: a Rust lib to trigger actions based on your screen activity (with LLMs)
The GitHub project "Screen Pipe" uses Large Language Models to convert screen content into actions. Implemented in Rust + WASM, inspired by `adept.ai`, `rewind.ai`, and `Apple Shortcut`. Open source under MIT license.
An Htmx Success Story
Discussion on transitioning from Django+React to Django+HTMX stack. Challenges with Django and React highlighted, solved with HTMX and AlpineJS. Improved simplicity, productivity, and compatibility with older devices. Transition driven by developer productivity.
It would be much better to have projects that work without bundlers, that can use them as an optimization step.
Turbopack is supposed to be coming, as a total rebuild of bundling. Rolldown seems solid, as a Rust roll-up redo.
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
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 doing a whole bunch of stuff, what are the bottlenecks? Package version resolution?
What exactly is the point of a bundler in the rapid development cycle? If you want your web app to load up fast, it's better if you only need to redownload the parts that actually changed, so you're better off not bundling them.
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.
- https://github.com/oxc-project/oxc
It's also what Rolldown (https://rolldown.rs/about) is basing their in-development bundler on.
It's very cool though and seems like a lot of effort went into this.
So tired of this ecosystem and its ceaseless tide of churn and rewrites and hypechasing.
Some competition is a good thing, and it seems to have led to a drive for performance in all these projects which I'm not complaining about, but I wonder if more could be gained by working together. Does every major company or framework need their own bundler?
Announcing with Rust in the title is not because of a hype train, it's a way to communicate that this bundler is in the new wave of transpilers/bundlers which is much faster than the old one (Webpack, Rollup) which were traditionally written in Javascript and painfully slow on large codebases.
While the JS ecosystem continues to be a huge mess, the solution to the problem is not LESS software development ("Just stop making more bundlers & stop trying to solve the problem - give up!"). Or even worse - solve the problem internally, but don't make me hear about it by open sourcing your code.
The huge amount of churn and development in this space has a good reason... it's a desperate attempt to solve the problems that browsers have created for web developers. Fact is that most business has moved to the web, a huge amount of web development is needed, but vanilla javascript can compounds and compound in complexity in the absence of a UI framework and strict typing. So now you've added transpilation and dependency management into the mix - and the user needs to download it in less than a second when they open a web page. And your code needs to work on at least 3 independent browser engines with varying versions.
SwiftUI devs are not a more advanced breed of developer than web developers. So why don't you see a huge amount SwiftUI churn and framework/compilation hell with native iOS development? The answer should be obvious. These problems are handed down from on high
The browser/internet/javascript ecosystem despite its glaring warts is actually one of the most amazing things humanity has created... a shareable document engine grew into a global distributed computing platform where you can script an application that can run on any device in less than a second with no installation. Not bad.
(Meanwhile, swc parser can't yet pass all tests in test262 according to their website: https://docs.rs/swc_ecma_parser/latest/swc_ecma_parser/ )
For dev I replaced webpack with "bun vite": it loads scripts ad hoc and is thus super fast at startup, and it still supports hot reloading.
For build I use "bun build". I've created a small script where I don't specify the output folder, but just intercept it, and do some simple search & replace things. It works perfectly, although it's a bit of a hack (simplified code):
const result = await Bun.build({
entrypoints: [srcName],
root: "./",
minify: true,
naming: `${configuratorName}.[hash].[ext]`,
});
for (const r of result.outputs) {
let jsSource = await r.text()
jsSource = jsSource.replaceAll("import.meta.hot","false")
Bun.write(outdir + r.path.substring(1), jsSource);
}
It might not be pretty, but it works super fast, and it only took me a couple of hours to convert the whole thing...Update:
For the record, the real script also uses the HtmlRewriter from cloudflare (included by default in bun) to alter some basic things in HTML templates as well...
[0] https://bun.sh
https://medium.com/chia-ux/what-do-chinese-clients-mean-h5-i...
> HMR
Hot Module Replacement allows all kinds of modules to be updated at runtime without the need for a full refresh. (Abridged from a webpack doc)
We already had our bundlers in Java and .NET land, before nodejs came to be, and life was good.
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 why that even matters. Even if it was 10 times faster I wouldn't use it because Vite is fast enough and have all the plugins I would ever need.
Related
Farm: Fast vite compatible build tool written in Rust
Farm is a Rust-based web building engine for efficient web programming. It accelerates React/Vue projects with fast updates, incremental building, module-level caching, and support for popular technologies like Sass, Less, Vue, and React.
Exposition of Front End Build Systems
Frontend build systems are crucial in web development, involving transpilation, bundling, and minification steps. Tools like Babel and Webpack optimize code for performance and developer experience. Various bundlers like Webpack, Rollup, Parcel, esbuild, and Turbopack are compared for features and performance.
Homegrown Rendering with Rust
Embark Studios develops a creative platform for user-generated content, emphasizing gameplay over graphics. They leverage Rust for 3D rendering, introducing the experimental "kajiya" renderer for learning purposes. The team aims to simplify rendering for user-generated content, utilizing Vulkan API and Rust's versatility for GPU programming. They seek to enhance Rust's ecosystem for GPU programming.
Show HN: a Rust lib to trigger actions based on your screen activity (with LLMs)
The GitHub project "Screen Pipe" uses Large Language Models to convert screen content into actions. Implemented in Rust + WASM, inspired by `adept.ai`, `rewind.ai`, and `Apple Shortcut`. Open source under MIT license.
An Htmx Success Story
Discussion on transitioning from Django+React to Django+HTMX stack. Challenges with Django and React highlighted, solved with HTMX and AlpineJS. Improved simplicity, productivity, and compatibility with older devices. Transition driven by developer productivity.