Bun is a fast, all-in-one toolkit for running, building, testing, and debugging JavaScript and TypeScript, from a single script to a full-stack application.
Now Bun v1.1 has released at April 1st, let’s explore what’s new in Bun v1.1.
Installing Bun is quite similar to install Node.js. All you need to do is:
Exciting news for Windows 10 users and beyond—Bun is now available for your platform! This marks a significant leap forward, opening up opportunities for a broader developer community to utilize Bun.
Bun's compatibility with Windows is robust, successfully passing 98% of the tests we use for macOS and Linux. This comprehensive coverage ensures that the full suite of Bun's capabilities—runtime, test runner, package manager, and bundler—are fully operational on Windows.
Ready to dive in with Bun on your Windows machine? Simply input the following command into your terminal to begin: > powershell -c "irm bun.sh/install.ps1 | iex"
Bun seamlessly integrates with JavaScript, TypeScript, and JSX thanks to its custom-built transpiler, which is crafted from highly efficient native code for optimal performance.
From the release of Bun 1.0, a specialized caching system has been in place for files exceeding 50KB, eliminating unnecessary re-transpilation and thereby enhancing speed and efficiency.
As a result of these innovations, command-line utilities such as tsc now execute up to twice as swiftly compared to their performance in Bun 1.0.
The Bun Shell has been transformed into a cross-platform shell, accessible not only on Unix-like systems but also on Windows, akin to bash.
Why should scripting with JavaScript, the most ubiquitous scripting language, be fraught with complexity? Bun simplifies the process.
To make bun run faster on Windows, Bun team has engineered a new file-format: .bunx.
The .bunx file serves as a universal symlink, functioning across different file systems to launch scripts or executables via Bun or Node.js. This innovation was driven by multiple factors:
Bun 1.1 is a significant update to the fast and versatile JavaScript and TypeScript toolkit, introducing Windows support, new APIs like Bun.Glob and Bun.Semver, enhanced features such as IPC support, and improvements in performance and stability.