19 unstable releases (3 breaking)
Uses new Rust 2024
new 0.5.5 | Sep 17, 2025 |
---|---|
0.5.4 | Sep 15, 2025 |
0.5.1 | Aug 28, 2025 |
0.4.12-alpha.0 | Jul 31, 2025 |
0.0.1 | Apr 6, 2022 |
#262 in Web programming
800 downloads per month
4MB
106K
SLoC
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.
For guide level documentation, please refer to the Rspack Guide.
Example
Rspack uses tokio
as the runtime for async operations. Here's an example of how to use with Compiler
:
[dependencies]
tokio = { version = "1", features = ["full"] }
rspack = "0.3"
rspack_core = "0.3"
use std::path::PathBuf;
use rspack::builder::{Builder, CompilerBuilder};
use rspack_core::Compiler;
#[tokio::main]
async fn main() {
use rspack_tasks::within_compiler_context_for_testing_sync;
within_compiler_context_for_testing_sync(|| {
let context =
PathBuf::from(env!("CARGO_MANIFEST_DIR").to_string()).join("tests/fixtures/basic");
let compiler = Compiler::builder()
.context(context)
.entry("main", "./src/index.js")
.build()
.unwrap();
let errors: Vec<_> = compiler.compilation.get_errors().collect();
assert!(errors.is_empty());
})
}
Stability
This crate and the dependencies that this crate are relying on are not stable yet. The API may change at any time. We do not guarantee any backward compatibility at the moment.
Features
Currently, there's still alot of features that are not implemented yet. Here's a list of features that are not implemented yet:
-
CompilerBuilder
API -
SplitChunksPlugin
API -
BundlerInfoPlugin
API -
StatsPrinter
API - Stable
Compiler
API - Stable
Compilation
API - Rust Plugin for Rspack
- ...
To track the current stats for API, please refer to this GitHub issue.
Dependencies
~75MB
~1.5M SLoC