Home

Vite team boasts 10-30x faster builds with Rust-powered Rolldown

Vite 8.0 has been released, and it uses Rust-built Rolldown as its single bundler, replacing both esbuild and Rollup, to enable faster builds.

Vite is both a development server and a build tool for TypeScript and JavaScript applications, with support for hot module replacement (HMR), which updates code without a full page reload, and plugins to add functionality such as framework-specific features. Vite can be used with many frameworks and, according to the introductory post for version 8.0, is currently downloaded 65 million times a week.

Rolldown is intended to be compatible with existing plugins since it supports the same plugin API. Although it is included with Vite 8, the Rolldown project still has release candidate status, and its minification feature – where source code is reduced to a small size with strategies such as the smallest possible variable names – is in alpha.

Rolldown is built on top of Oxc, also coded with Rust. Oxc is a utility whose features include linting, formatting, parsing, transpiling TypeScript and JSX (code to define React elements), module resolution, and minification.

Both Rolldown and Oxc are open source projects sponsored by Void Zero, a company founded in 2024 by Evan You, creator of both Vite and the Vue.js framework. When the company was founded, You said that a unified toolchain was necessary to overcome the challenges of the JavaScript ecosystem: "fragmentation, incompatibilities, and inefficiency."

The Vite team claims that Rolldown is "10-30x faster than Rollup," and matches the performance of esbuild, which is also native code, though written in Go.

Additional new features in Vite 8.0 include new DevTools for build analysis and debugging (provided that Rolldown is used), Wasm support in SSR (server-side rendering) environments, and forwarding of browser console logs to the dev server terminal.

Future plans include a full bundle mode, where modules are bundled during development as well as for production. Fast build times make this more practical. "Preliminary results show 3x faster dev server startup, 40 percent faster full reloads, and 10x fewer network requests," said the team.

Early reaction to Vite 8.0 is positive, mainly because of faster build times. "We saw 12m -> 2m on one of our biggest projects," said one user.

Rolldown is not the only example of rewriting a build tool in Rust. Others include the Vercel-sponsored Turbopack project, created by the inventor of Webpack, Tobias Koppers; and Rspack from ByteDance, which is coded in Rust but compatible with Webpack. All three perform well – though not quite as well as Bun, built with Zig, according to current benchmarks. The snag with Turbopack is its tight integration with the Next.js framework, while Rolldown and Vite benefit from a plugin ecosystem and wide framework support.

The TypeScript project is also turning to native code for its compiler (tsc) in the forthcoming TypeScript 7.0, using the Go language, with Microsoft's Anders Hejlsberg, the inventor of TypeScript, claiming more than 10x performance gains.

The awkward question: if the use of native code tools brings such a big benefit to TypeScript and JavaScript projects, should developers also reconsider using an interpreted language for the project code itself if running outside the browser? Visual Studio Code, the most popular IDE, is written in TypeScript and uses the Electron framework, but is slower and uses more memory than native code editors such as Zed or Notepad++. ®

Source: The register

Previous

Next