web-infra-dev / rspack
The fast Rust-based JavaScript bundler with webpack-compatible API đĻī¸
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing web-infra-dev/rspack in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Summary (README)
PreviewRspack
<p> <a href="https://discord.gg/79ZZ66GH9E"><img src="https://img.shields.io/badge/chat-discord-blue?style=flat-square&logo=discord&colorA=564341&colorB=EDED91" alt="discord channel" /></a> <a href="https://www.npmjs.com/package/@rspack/core?activeTab=readme"><img src="https://img.shields.io/npm/v/@rspack/core?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" /></a> <a href="https://crates.io/crates/rspack_core"><img src="https://img.shields.io/crates/v/rspack_core?style=flat-square&colorA=564341&colorB=EDED91" alt="crates version" /></a> <a href="https://npmcharts.com/compare/@rspack/core?minimal=true"><img src="https://img.shields.io/npm/dm/@rspack/core.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a> <a href="https://nodejs.org/en/about/previous-releases"><img src="https://img.shields.io/node/v/@rspack/core.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="node version"></a> <a href="https://github.com/web-infra-dev/rspack/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" /></a> <a href="https://codspeed.io/web-infra-dev/rspack"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fcodspeed.io%2Fbadge.json&style=flat-square&colorA=564341&colorB=EDED91" alt="codspeed" /></a> </p>English | įŽäŊ䏿
Rspack is a high performance JavaScript bundler written in Rust. It offers strong compatibility with the webpack ecosystem, allowing for seamless replacement of webpack, and provides lightning fast build speeds.
⨠Features
- đ Fast Startup: Based on Rust, the build speed is extremely fast, bringing you the ultimate development experience.
- ⥠Lightning HMR: With a built-in incremental compilation mechanism, HMR is extremely fast and fully capable of developing large-scale projects.
- đĻ Webpack Compatible: Compatible with plugins and loaders in the webpack ecosystem, seamlessly integrating excellent libraries built by the community.
- đ¨ Module Federation: Provide first-class support for Module Federation to facilitate the development of large-scale web applications.
- đ ī¸ Production Optimization: Various optimization strategies are built in by default, such as tree shaking, minification, etc.
- đ¯ Framework Agnostic: Not bound to any frontend framework, ensuring enough flexibility.
Read Introduction for details.
đĻ Rstack
Rstack is a unified JavaScript toolchain centered on Rspack, with high performance and consistent architecture.
| Name | Description | Version |
|---|---|---|
| Rspack | Bundler | <a href="https://npmjs.com/package/@rspack/core"><img src="https://img.shields.io/npm/v/@rspack/core?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" /></a> |
| Rsbuild | Build tool | <a href="https://npmjs.com/package/@rsbuild/core"><img src="https://img.shields.io/npm/v/@rsbuild/core?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" /></a> |
| Rslib | Library development tool | <a href="https://npmjs.com/package/@rslib/core"><img src="https://img.shields.io/npm/v/@rslib/core?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" /></a> |
| Rspress | Static site generator | <a href="https://npmjs.com/package/@rspress/core"><img src="https://img.shields.io/npm/v/@rspress/core?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" /></a> |
| Rsdoctor | Build analyzer | <a href="https://npmjs.com/package/@rsdoctor/core"><img src="https://img.shields.io/npm/v/@rsdoctor/core?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" /></a> |
| Rstest | Testing framework | <a href="https://npmjs.com/package/@rstest/core"><img src="https://img.shields.io/npm/v/@rstest/core?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" /></a> |
| Rslint | Linter | <a href="https://npmjs.com/package/@rslint/core"><img src="https://img.shields.io/npm/v/@rslint/core?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" /></a> |
Getting started
<p> <a target="_blank" href="https://stackblitz.com/fork/github/rstackjs/rspack-stackblitz-example"> <img alt="Open in StackBlitz" src="https://developer.stackblitz.com/img/open_in_stackblitz.svg" /> </a> </p>See Quick start.
Contribution
Please read the contributing guide and let's build Rspack together.
Code of conduct
This repo has adopted the ByteDance Open Source Code of Conduct. Please check Code of conduct for more details.
Community
Come chat with us on Discord! Rspack team and Rspack users are active there, and we're always looking for contributions.
Links
| Name | Description |
|---|---|
| awesome-rstack | A curated list of awesome things related to Rstack |
| Rspack 2.x docs | Documentation for Rspack 2.x (beta) |
| Rspack 1.x docs | Documentation for Rspack 1.x (latest) |
| Rspack 0.x docs | Documentation for Rspack 0.x version |
| rspack-dev-server | Dev server for Rspack |
| rstack-examples | Examples showcasing Rstack |
| rspack-sources | Rust port of webpack-sources |
| rstack-design-resources | Design resources for Rstack |
Contributors
<a href="https://github.com/web-infra-dev/rspack/graphs/contributors"><img src="https://opencollective.com/rspack/contributors.svg?width=890&button=false" /></a>
Benchmark
See Benchmark.
Credits
Thanks to:
- The webpack team and community for creating a great bundler and ecosystem from which we draw a lot of inspiration.
- @sokra for the great work on the webpack project.
- @ScriptedAlchemy for creating Module Federation and helping Rspack connect with the community.
- The SWC project created by @kdy1, which powers Rspack's code parsing, transformation and minification.
- The esbuild project created by @evanw, which inspired the concurrent architecture of Rspack.
- The NAPI-RS project created by @Brooooooklyn, which powers Rspack's node-binding implementation.
- The Parcel project created by @devongovett which is the pioneer of rust bundler and inspired Rspack's incremental rebuild design.
- The Vite project created by Evan You which inspired Rspack's compatibility design of webpack's ecosystem.
- The
rolldown-legacyproject created by old Rolldown team, It's the predecessor of the rolldown project, which explores the possibility of making a performant bundler in Rust with Rollup-compatible API. It inspires the design principles of Rspack. - The html-webpack-plugin project created by @jantimon,
@rspack/html-pluginis a fork of html-webpack-plugin to avoid some webpack API usage not supported in Rspack. - The Turbopack project which inspired the AST path logic of Rspack.
- The react-refresh-webpack-plugin created by @pmmmwh, which inspires implement react refresh rspack plugin.
- The prefresh created by @Jovi De Croock, which inspires implement preact refresh rspack plugin.
- The mini-css-extract-plugin project created by @sokra which inspired implement css extract plugin.
- The copy-webpack-plugin project created by @kevlened which inspired implement copy rspack plugin.
- The webpack-subresource-integrity project created by @jscheid, which inspires implement subresource integrity rspack plugin.
- The circular-dependency-plugin project created by @aackerman, which inspres implement circular dependency rspack plugin.
- The tracing-chrome project created by thoren-d, which inspires the implementation of Rspack tracing.
License
Rspack is MIT licensed.