Introduction to Cruller
In the fast-evolving development environments, optimizing performance while reducing complexity has become essential. Cruller fits perfectly into this perspective. It is a fork of the last Zig-based Bun runtime focused on production, recently ported to Zig 0.16. This project aims to streamline the runtime to focus on critical production needs.
Why Zig 0.16?
Zig 0.16 introduces several improvements that make development more efficient, including more robust semantic checks and improved build version management. Cruller leverages these features to offer a more agile and reliable runtime, particularly on Linux x64, currently the main supported build target.
What Has Been Removed
To streamline Cruller, several components have been removed: the package manager, transpiler, shell, test runner, and other development-oriented subsystems. The goal is to retain only essential elements: JavaScriptCore, Bun.serve, HTTP/1-3, WebSockets, and a few other features to serve pre-built JavaScript applications.
Benefits and Performance
One of Cruller's main advantages is its significant size reduction. Compared to the official Bun version, Cruller is about 18% lighter, with a runtime of 73.0 MiB versus 88.5 MiB for Bun. In terms of performance, benchmarks show that Cruller is on par with Bun, with even a slight 2% average advantage in V8 Crypto pure-JS benchmarks.
A Production-Centric Approach
The idea behind Cruller is to provide a minimalist runtime for production. Developers can use the full Bun runtime for development and switch to Cruller in production. This allows maximizing performance while minimizing the resources needed for deployment.
Conclusion
Cruller represents an interesting advancement for those looking to optimize their JavaScript production environments without being burdened by unnecessary features. Its compatibility with Zig 0.16 makes it a wise choice for those who want to leverage the latest advancements in this technology.
Let's discuss your project in 15 minutes.