Skip to content

Commit dcc4850

Browse files
authored
docs: update Rspack roadmap (#9241)
1 parent 36a549a commit dcc4850

File tree

9 files changed

+139
-74
lines changed

9 files changed

+139
-74
lines changed

website/docs/en/api/javascript-api/index.mdx

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import WebpackLicense from '@components/WebpackLicense';
22
import { Collapse, CollapsePanel } from '@components/Collapse';
3-
import { PackageManagerTabs } from '@theme';
3+
import { Tab, Tabs, PackageManagerTabs } from '@theme';
44
import { Stability } from '@components/ApiMeta';
55
import CompilerType from '../../types/compiler.mdx';
66
import WatchingType from '../../types/watching.mdx';
@@ -24,12 +24,25 @@ To start using the Rspack JavaScript API, first install `@rspack/core` if you ha
2424

2525
<PackageManagerTabs command="add @rspack/core -D" />
2626

27-
Then require the `@rspack/core` module in your JavaScript file:
27+
Then introduce the `@rspack/core` module in your JavaScript file:
2828

29-
```js title="build.js"
29+
<Tabs>
30+
<Tab label="ESM">
31+
32+
```js title="build.mjs"
3033
import { rspack } from '@rspack/core';
3134
```
3235

36+
</Tab>
37+
<Tab label="CJS">
38+
39+
```js title="build.cjs"
40+
const { rspack } = require('@rspack/core');
41+
```
42+
43+
</Tab>
44+
</Tabs>
45+
3346
## rspack()
3447

3548
The imported rspack function is fed a Rspack Configuration Object and runs the Rspack compiler if a callback function is provided:

website/docs/en/guide/start/introduction.mdx

+12-25
Original file line numberDiff line numberDiff line change
@@ -59,31 +59,18 @@ Rspack was initially created to solve performance problems encountered at ByteDa
5959

6060
As of August 2024, we have released [Rspack 1.0](/blog/announcing-1-0), which is now what we consider production-ready as it covers most of webpack's APIs and features.
6161

62-
Rspack is currently compatible with almost all loaders in the community. For the 50 most downloaded [webpack plugins](/guide/compatibility/plugin), more than 80% can be used in Rspack or have an alternative.
62+
Rspack is currently compatible with almost all loaders in the community. For the 50 most downloaded [webpack plugins](/guide/compatibility/plugin), more than 85% can be used in Rspack or have an alternative.
6363

64-
Please refer to the [Rspack blog](/blog/index) for the latest updates on Rspack.
64+
:::tip Learn more
6565

66-
## The future of Rspack
66+
- See [Rspack blogs](/blog/index) for the latest updates on Rspack.
67+
- See [Roadmap](/misc/planning/roadmap) for the future plans of Rspack.
6768

68-
Although Rspack already meets the needs of many projects, there are still some gaps to reach the full capabilities of webpack. Prioritization will be based on community feedback, so please tell us about your needs!
69+
:::
6970

70-
### Collaboration with community partners
71+
## Comparisons with other tools
7172

72-
We are very willing to provide support to framework teams and toolchains within the community to unleash the true performance advantages of Rspack. If your framework or toolchain has a demand for high-performance build engines, let us know!
73-
74-
### Enhancing plugin capabilities
75-
76-
Rspack already implements the full `Loader` interface and most of the webpack plugin APIs. Although our goal is not to achieve 100% compatibility for plugin APIs, we will try our best to implement the mainstream requirements based on community feedback. At the same time, we are also exploring higher-performance plugin communication solutions to reduce the cost of plugin communication, thereby ensuring more plugin APIs can be implemented.
77-
78-
### Continuously improving performance
79-
80-
Performance is the core selling point and focus of Rspack development. In the future we'll explore higher-performance concurrent/multi-core-friendly algorithms, higher-performance caching solutions, higher-performance plugin communication solutions, etc.
81-
82-
### Expanding the test suite
83-
84-
Today Rspack is primarily tested using a subset of webpack's test cases. In the future, we'll cover more of these tests, while also expanding the test suite and including community projects to ensure compatibility across Rspack releases.
85-
86-
## Compared with webpack
73+
### Compared with webpack
8774

8875
[webpack](https://webpack.js.org/) is perhaps the most mature modern bundler, with an active ecosystem, flexible configuration, and rich features.
8976

@@ -95,23 +82,23 @@ Today Rspack is primarily tested using a subset of webpack's test cases. In the
9582

9683
- **Optimized hot module replacement (HMR):** No matter how large your project is, ensuring a great experience for HMR places even steeper demands for build times than ordinary bundling. Rspack incorporates a specialized incremental compilation strategy to address this requirement.
9784

98-
## Compared with Vite
85+
### Compared with Vite
9986

10087
[Vite](https://vitejs.dev/) offers a great developer experience, but its reliance on [Rollup](https://rollupjs.org/) for production builds faces similar performance costs as other JavaScript-based algorithms. The same tradeoffs of webpack versus Rollup also apply, for example missing flexibility of the [optimization.splitChunks](/config/optimization#optimizationsplitchunks) feature.
10188

102-
## Compared with esbuild
89+
### Compared with esbuild
10390

10491
[esbuild](https://esbuild.github.io/) achieves very good performance by implementing nearly all operations in Golang except for some JavaScript plugins. However, esbuild's feature set is not as complete as webpack, for example missing HMR and [optimization.splitChunks](/config/optimization#optimizationsplitchunks) features.
10592

106-
## Compared with Turbopack
93+
### Compared with Turbopack
10794

10895
[Turbopack](https://turbo.build/) is implemented in Rust like Rspack, but Turbopack started over with a redesigned architecture and configuration. This brings some benefits, but presents a steeper migration cost for projects that rely on webpack and its extensive ecosystem.
10996

110-
## Compared with Rollup
97+
### Compared with Rollup
11198

11299
Rspack and Rollup are both bundling tools, but they focus on different areas. Rollup is more suitable for bundling libraries, while Rspack is more suitable for bundling applications. Therefore, Rspack has optimized many features for bundling applications, such as HMR and Bundle splitting. Rollup produces ESM outputs that are more friendly to libraries than Rspack. There are also many tools in the community that encapsulate Rollup to some extent and provide more friendly support for bundling applications, such as vite and wmr. Currently, Rspack has better production build performance than rollup.
113100

114-
## Compared with Parcel
101+
### Compared with Parcel
115102

116103
The overall architecture of Rspack shares many similarities with [Parcel](https://parceljs.org/). For example, both treat CSS assets as first-class citizens and both support filter-based transformers. However, Parcel focuses more on out-of-the-box usability, while Rspack focuses more on providing flexible configuration for higher-level frameworks and tools. Parcel innovatively designed features like the Unified Graph and making HTML a first-class citizen. Rspack also plans to support these features in the future.
117104

website/docs/en/guide/start/quick-start.mdx

+8-1
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,14 @@ See [Configure Rspack](/config/index) to learn about how to configure Rspack.
107107

108108
## Migrating from existing projects
109109

110-
If you need to migrate from an existing project to Rspack or Rsbuild, you can refer to the following guides:
110+
If you need to migrate from an existing project to Rspack stack, you can refer to the following guides:
111111

112112
- [Migrating from webpack to Rspack](/guide/migration/webpack)
113113
- [Migrating from webpack to Rsbuild](https://rsbuild.dev/guide/migration/webpack)
114114
- [Migrating from Create React App to Rsbuild](https://rsbuild.dev/guide/migration/cra)
115115
- [Migrating from Vue CLI to Rsbuild](https://rsbuild.dev/guide/migration/vue-cli)
116116
- [Migrating from Vite to Rsbuild](https://rsbuild.dev/guide/migration/vite)
117+
- [Migrating from Tsup to Rslib](https://lib.rsbuild.dev/guide/migration/tsup)
117118
- [Migrating from Storybook](/guide/migration/storybook)
118119

119120
## Ecosystem
@@ -156,6 +157,12 @@ Docusaurus v3.6 supports Rspack as the bundler, see [Docusaurus Faster](https://
156157

157158
Nuxt v3.14 introduces a new first-class Nuxt builder for Rspack, see [Nuxt 3.14](https://nuxt.com/blog/v3-14) for details.
158159

160+
### Re.pack
161+
162+
[Re.pack](https://github.com/callstack/repack) is a toolkit for building your React Native application.
163+
164+
Re.Pack v5 uses Rspack and React Native community CLI's plugin system to allow you to bundle your application using Rspack and easily switch from Metro.
165+
159166
### More
160167

161168
Visit [awesome-rspack](https://github.com/web-infra-dev/awesome-rspack) to discover more projects within the Rspack ecosystem.

website/docs/en/misc/planning/roadmap.mdx

+37-11
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,37 @@
22

33
The current document lists some important features that Rspack will support, some of which are already in progress, while others will be implemented in future versions of Rspack.
44

5-
> Last updated: 2024-10
5+
> Last updated: February 2025
66
77
## Rspack 1.x iteration
88

9-
Rspack will release a minor version every 2-3 months, each containing significant new features and improvements.
9+
Rspack will release a minor version every 2-3 months, each containing significant new features and performance improvements.
1010

11-
## Faster HMR
11+
See [Rspack blogs](/blog/index) to learn about the latest minor versions of Rspack.
1212

13-
We are developing a new incremental build implementation that will significantly enhance Rspack's HMR performance.
13+
## Wasm build
1414

15-
Rspack v1.1 will support this feature experimentally, and will continue to optimize it in future versions until it is enabled by default.
15+
We plan to compile Rspack's Rust code into WebAssembly format, allowing Rspack to run in the browser.
16+
17+
You can see the current progress in this PR: [#9134](https://github.com/web-infra-dev/rspack/pull/9134).
18+
19+
## Introduce Rstest
20+
21+
We are implementing [Rstest](https://github.com/rspack/rstest), a testing framework based on Rspack. It can seamlessly integrate with Rspack's ecosystem and provide out-of-the-box testing capabilities.
22+
23+
We plan to release the first version of Rstest in the second half of 2025.
24+
25+
## Incremental build
26+
27+
Rspack v1.1 introduces experimental support for [incremental build](/config/experiments#experimentsincremental), which significantly enhances Rspack's HMR performance.
28+
29+
We will continue to optimize this feature in future versions until it is enabled by default.
1630

1731
## Persistent cache
1832

19-
Persistent Cache can cache the build artifacts during multiple builds, significantly reducing the time for subsequent builds, especially providing a substantial performance boost for large projects.
33+
Persistent cache can cache the build artifacts during multiple builds, significantly reducing the time for subsequent builds, especially providing a substantial performance boost for large projects.
2034

21-
We are implementing the Persistent Cache feature for Rspack and plan to release experimental support in Rspack v1.2.
35+
Rspack v1.2 introduces experimental support for [persistent cache](/config/experiments#experimentscache). We will continue to optimize it in the future to further improve cache performance and coverage.
2236

2337
## Portable cache
2438

@@ -28,15 +42,15 @@ After that, we plan to continue implementing portable cache. This means that Rsp
2842

2943
## Webpack API alignment
3044

31-
As webpack contains a large number of APIs, we will be working to support the most frequently used loaders and plugins based on feedback from the community first.
45+
As webpack has a rich API interface, we are taking a progressive approach to support them. We will closely follow community feedback and prioritize support for commonly used loaders and plugins.
3246

33-
## Stable Rust API
47+
## Stabilize Rust API
3448

35-
Currently, higher-level tools can use the JS API to integrate Rspack, which provides good extensibility. However, the communication overhead between Rust and JavaScript that limits the performance of Rspack. We also provide the [SWC Wasm plugin](/guide/features/builtin-swc-loader#jscexperimentalplugins) to support extensions, but its performance is still slower than native languages.To provide higher-level tools with more flexible integration options and better performance, we plan to expose Rspack's Rust API for integration.
49+
Currently, higher-level tools can use the [JS API](/api/javascript-api/index) to integrate Rspack, which provides good extensibility. However, the communication overhead between Rust and JavaScript that limits the performance of Rspack. We also provide the [SWC Wasm plugin](/guide/features/builtin-swc-loader#jscexperimentalplugins) to support extensions, but its performance is still slower than native languages.To provide higher-level tools with more flexible integration options and better performance, we plan to expose Rspack's Rust API for integration.
3650

3751
## Improved ESM output
3852

39-
ESM is the standard for JavaScript modules. We are currently improving Rspack and webpack's support for ESM output and creating a library build tool based on Rspack called Rslib. This will allow developers to make better use of ESM's static analysis and tree-shaking when building npm packages.
53+
ESM is the standard for JavaScript modules. We are currently improving Rspack and webpack's support for ESM output and creating a library build tool based on Rspack called [Rslib](https://github.com/web-infra-dev/rslib). This will allow developers to make better use of ESM's static analysis and tree-shaking when building npm packages.
4054

4155
## React Server Components support
4256

@@ -45,3 +59,15 @@ At ByteDance, we have experimentally supported RSC ([React Server Components](ht
4559
## TypeScript-based optimization
4660

4761
Currently, when Rspack processes TypeScript modules, it first converts them to JavaScript through a loader before further processing. This provides flexibility but also hinders further optimization of the build output. For example, developers need to use `enum` instead of `const enum`, but `enum` is difficult to optimize as a constant. In the future, we plan to treat TypeScript as a first-class citizen in Rspack, leveraging TypeScript's static information to provide more advanced compile-time optimization of the build output (such as [type-based property renaming](https://github.com/google/closure-compiler/wiki/Type-Based-Property-Renaming)).
62+
63+
### Continuously improving performance
64+
65+
Performance is the core selling point and focus of Rspack development. In the future we'll explore higher-performance concurrent/multi-core-friendly algorithms, higher-performance caching solutions, higher-performance plugin communication solutions, etc.
66+
67+
### Expanding the test suite
68+
69+
Today Rspack is primarily tested using a subset of webpack's test cases. In the future, we'll cover more of these tests, while also expanding the test suite and including community projects to ensure compatibility across Rspack releases.
70+
71+
### Collaboration with community partners
72+
73+
We are very willing to provide support to framework teams and toolchains within the community to unleash the true performance advantages of Rspack. If your framework or toolchain has a demand for high-performance build engines, let us know!

website/docs/zh/api/javascript-api/index.mdx

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import WebpackLicense from '@components/WebpackLicense';
22
import { Collapse, CollapsePanel } from '@components/Collapse';
3-
import { PackageManagerTabs } from '@theme';
3+
import { Tab, Tabs, PackageManagerTabs } from '@theme';
44
import { Stability } from '@components/ApiMeta';
55
import CompilerType from '../../types/compiler.mdx';
66
import WatchingType from '../../types/watching.mdx';
@@ -26,10 +26,23 @@ Rspack 提供了一组 JavaScript API,可在 Node.js、Deno、Bun 等 JavaScri
2626

2727
在 JavaScript 文件中,引入 `@rspack/core` 模块:
2828

29-
```js title="build.js"
29+
<Tabs>
30+
<Tab label="ESM">
31+
32+
```js title="build.mjs"
3033
import { rspack } from '@rspack/core';
3134
```
3235

36+
</Tab>
37+
<Tab label="CJS">
38+
39+
```js title="build.cjs"
40+
const { rspack } = require('@rspack/core');
41+
```
42+
43+
</Tab>
44+
</Tabs>
45+
3346
## rspack()
3447

3548
导入的 `rspack` 函数会将`配置对象`传给 Rspack,如果同时传入回调函数会在 Rspack compiler 运行时被执行:

website/docs/zh/guide/start/introduction.mdx

+5-20
Original file line numberDiff line numberDiff line change
@@ -66,29 +66,14 @@ import rspackAudio from '../../../public/rspack.mp3';
6666

6767
我们在 2024 年 8 月发布了 [Rspack 1.0 版本](/blog/announcing-1-0),覆盖了 webpack 绝大多数的 API 和功能,并达到生产稳定。
6868

69-
目前,Rspack 已经兼容了社区几乎所有的 webpack loader。在下载量最高的 50 个 [webpack 插件](/guide/compatibility/plugin) 中,80% 以上都可以在 Rspack 中使用,或是找到替代方案。
69+
目前,Rspack 已经兼容了社区几乎所有的 webpack loader。在下载量最高的 50 个 [webpack 插件](/guide/compatibility/plugin) 中,85% 以上都可以在 Rspack 中使用,或是找到替代方案。
7070

71-
请参考 [Rspack 博客](/blog/index) 来了解 Rspack 的最新动态。
71+
:::tip 了解更多
7272

73-
## Rspack 的未来
73+
- 请参考 [Rspack 博客](/blog/index) 来了解 Rspack 的最新动态。
74+
- 请参考 [功能规划](/misc/planning/roadmap) 来了解 Rspack 的未来规划。
7475

75-
虽然 Rspack 目前提供的能力已经能够满足大多数项目的使用,但是相比于 webpack 提供的完整能力,Rspack 仍然存在一些差距。因此,我们会根据社区的反馈,持续丰富 Rspack 的能力,从而满足更多构建场景的需求。
76-
77-
### 和社区的伙伴合作
78-
79-
Rspack 作为一个底层依赖,解决了我们在工作中遇到的很多问题,相信它也可以帮助社区解决一些问题。我们非常期待能与社区内的框架团队深入合作,让大家发挥出 Rspack 真正的性能优势。如果你的框架或者工具链对高性能构建引擎有需求,欢迎联系我们来获得更好的支持。
80-
81-
### 提升插件化能力
82-
83-
目前 Rspack 已经支持了完整的 Loader API 和大部分的 webpack plugin API。webpack 有着海量的 plugin API,虽然我们的目标**不是**实现 plugin API 的 100% 兼容,但是我们会尽可能地实现社区主流需要的 plugin API,以满足社区的需求。同时我们也在探索更高性能的插件通信方案,减小插件通信成本,以保证可以实现更多的插件 API。
84-
85-
### 持续提升性能
86-
87-
性能是 Rspack 的核心卖点,所以在未来我们会持续地对 Rspack 进行性能优化,提升 Rspack 的性能。如探索更高性能的并发/多核友好的算法,探索更高性能的缓存方案,探索更高性能的插件通信方案等等。
88-
89-
### 建设完善的质量保障体系
90-
91-
Rspack 复用了 webpack 的测试用例,未来我们会覆盖更多的 webpack 的测试用例,同时建设完善的 CI 体系,持续提升测试覆盖率,与社区项目共建 Ecosystem CI,避免 Rspack 的升级对上游项目造成 break,保障项目长期健康发展。
76+
:::
9277

9378
## 和其他构建工具的对比
9479

website/docs/zh/guide/start/quick-start.mdx

+8-1
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,14 @@ npm init -y
112112

113113
## 从现有项目迁移
114114

115-
如果你需要从一个现有项目迁移迁移到 Rspack 或 Rsbuild,可以参考以下指南:
115+
如果你需要从一个现有项目迁移迁移到 Rspack 技术栈,可以参考以下指南:
116116

117117
- [从 webpack 迁移到 Rspack](/guide/migration/webpack)
118118
- [从 webpack 迁移到 Rsbuild](https://rsbuild.dev/zh/guide/migration/webpack)
119119
- [从 Create React App 迁移到 Rsbuild](https://rsbuild.dev/zh/guide/migration/cra)
120120
- [从 Vue CLI 迁移到 Rsbuild](https://rsbuild.dev/zh/guide/migration/vue-cli)
121121
- [从 Vite 迁移到 Rsbuild](https://rsbuild.dev/zh/guide/migration/vite)
122+
- [从 Tsup 迁移到 Rslib](https://lib.rsbuild.dev/zh/guide/migration/tsup)
122123
- [从 Storybook 迁移](/guide/migration/storybook)
123124

124125
## 生态
@@ -161,6 +162,12 @@ Docusaurus v3.6 支持使用 Rspack 作为打包工具,详见 [Docusaurus Fast
161162

162163
Nuxt v3.14 引入了对 Rspack 的官方支持,详见 [Nuxt 3.14](https://nuxt.com/blog/v3-14)
163164

165+
### Re.pack
166+
167+
[Re.pack](https://github.com/callstack/repack) 是一个用于构建 React Native 应用的工具集。
168+
169+
Re.Pack v5 使用 Rspack 和 React Native 社区 CLI 的插件系统,允许你使用 Rspack 打包你的应用,并轻松切换到 Metro。
170+
164171
### 更多
165172

166173
访问 [awesome-rspack](https://github.com/web-infra-dev/awesome-rspack) 来发现更多 Rspack 生态中的项目。

0 commit comments

Comments
 (0)