Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ oxfmt
precheck
quasis
rsbuild
Rsdoctor
rslib
rslint
rslog
Expand Down
5 changes: 5 additions & 0 deletions website/docs/en/_nav.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"link": "/guide/quick-start",
"activeMatch": "/guide/"
},
{
"text": "Blog",
"link": "/blog/",
"activeMatch": "/blog/"
},
{
"text": "Changelog",
"link": "https://github.com/rstackjs/rstack-cli/releases"
Expand Down
1 change: 1 addition & 0 deletions website/docs/en/blog/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["index", "introducing-rstack-cli"]
9 changes: 9 additions & 0 deletions website/docs/en/blog/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Rstack CLI blogs
description: 'Blog posts about Rstack CLI.'
sidebar: false
---

import { BlogList } from '../../../theme/components/BlogList';

<BlogList />
16 changes: 16 additions & 0 deletions website/docs/en/blog/introducing-rstack-cli.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
date: 2026-11-17
sidebar: false
authors:
- name: chenjiahan
avatar: 'https://github.com/chenjiahan.png'
github: 'chenjiahan'
---

import { BlogAuthors } from '@rstackjs/doc-ui/blog-authors';

# Introducing Rstack CLI

_November 17, 2026_

<BlogAuthors />
5 changes: 5 additions & 0 deletions website/docs/zh/_nav.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"link": "/guide/quick-start",
"activeMatch": "/guide/"
},
{
"text": "博客",
"link": "/blog/",
"activeMatch": "/blog/"
},
{
"text": "更新日志",
"link": "https://github.com/rstackjs/rstack-cli/releases"
Expand Down
1 change: 1 addition & 0 deletions website/docs/zh/blog/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["index", "introducing-rstack-cli"]
9 changes: 9 additions & 0 deletions website/docs/zh/blog/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Rstack CLI 博客
description: '与 Rstack CLI 相关的博客文章。'
sidebar: false
---

import { BlogList } from '../../../theme/components/BlogList';

<BlogList />
34 changes: 34 additions & 0 deletions website/docs/zh/blog/introducing-rstack-cli.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
date: 2026-11-17
sidebar: false
authors:
- name: chenjiahan
avatar: 'https://github.com/chenjiahan.png'
github: 'chenjiahan'
---

import { BlogAuthors } from '@rstackjs/doc-ui/blog-authors';

# Rstack CLI 介绍 \{#introducing-rstack-cli}

_2026 年 11 月 17 日_

<BlogAuthors />

我们很高兴地宣布 [Rstack CLI](https://github.com/rstackjs/rstack-cli) 正式发布!

Rstack CLI 是一个为 JavaScript 开发者和 Agents 设计的统一命令行工具,内置开发、构建、测试、代码检查、格式化等能力,旨在简化 JavaScript 项目的开发流程,并提供统一的体验。

## Rstack 的诞生

回望 2022 年,为了解决字节跳动内部 webpack 项目的构建性能问题,我们开发了 [Rspack](https://rspack.rs/),一个基于 Rust 编写的高性能打包工具,并在 2023 年初将它开源。Rspack 兼顾了性能、产物质量和迁移成本,因此很快获得了社区的关注,并逐渐被微软、OpenAI、DeepSeek 等公司采用,npm 周下载量也增长到一千多万次。

随着构建性能问题得到缓解,另一个不可忽视的问题是 webpack 高昂的配置成本。在 2023 至 2024 年,我们基于 Rspack 陆续开发了 [Rsbuild](https://rsbuild.rs/)、[Rslib](https://rslib.rs/) 和 [Rspress](https://rspress.rs/)。它们将复杂的打包配置封装在工具内部,分别为应用开发、库开发和文档站点提供开箱即用的支持。

随着 Agentic Coding 的流行,我们希望打造更可靠的工具,为 Agent 的开发过程建立质量约束。因此我们继续开发了构建分析工具 [Rsdoctor](https://rsdoctor.rs/),测试框架 [Rstest](https://rstest.rs/),以及代码检查工具 [Rslint](https://rslint.rs/)。它们能和其他工具相互配合,提供更连贯的开发体验。例如,Rstest 可以复用 Rsbuild 的配置和插件,Rslint 则内置了针对 Rstest 测试代码的 lint 规则。

所有这些工具共同组成了 Rstack ——

![](https://assets.rspack.rs/rstack/rstack-overview-dark-zh.png)

## 从独立工具到统一 CLI
55 changes: 55 additions & 0 deletions website/theme/components/BlogList.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import { useLang, usePages } from '@rspress/core/runtime';
import { Link, renderInlineMarkdown } from '@rspress/core/theme';
import type { BlogAvatarAuthor } from '@rstackjs/doc-ui/blog-avatar';
import { BlogBackground } from '@rstackjs/doc-ui/blog-background';
import {
BlogList as BaseBlogList,
type BlogListItem,
} from '@rstackjs/doc-ui/blog-list';

type BlogFrontmatter = {
description?: string;
date?: string;
authors?: BlogAvatarAuthor[];
};

const getDateValue = (date?: BlogListItem['date']): number => {
const timestamp = date ? new Date(date).getTime() : 0;
return Number.isNaN(timestamp) ? 0 : timestamp;
};

export function BlogList() {
const { pages } = usePages();
const lang = useLang();
const posts = pages
.filter(
(page) =>
page.lang === lang &&
page.routePath.includes('/blog/') &&
!page.routePath.endsWith('/blog/'),
)
.map((page): BlogListItem => {
const frontmatter = (page.frontmatter ?? {}) as BlogFrontmatter;

return {
title: page.title,
description: frontmatter.description,
date: frontmatter.date,
href: page.routePath,
authors: frontmatter.authors,
};
})
.sort((a, b) => getDateValue(b.date) - getDateValue(a.date));

return (
<>
<BaseBlogList
posts={posts}
lang={lang}
LinkComp={Link}
renderInlineMarkdown={renderInlineMarkdown}
/>
<BlogBackground />
</>
);
}
32 changes: 30 additions & 2 deletions website/theme/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,39 @@
import { Layout as BaseLayout } from '@rspress/core/theme-original';
import { useLang, usePage } from '@rspress/core/runtime';
import {
Layout as BaseLayout,
DocLayout as BaseDocLayout,
Link,
type DocLayoutProps,
} from '@rspress/core/theme-original';
import { BlogBackButton } from '@rstackjs/doc-ui/blog-back-button';
import { NavIcon } from '@rstackjs/doc-ui/nav-icon';
import { HomeLayout } from './pages';
import '@rstackjs/doc-ui/theme.css';
import './index.scss';

const Layout = () => <BaseLayout beforeNavTitle={<NavIcon />} />;

export { HomeLayout, Layout };
const DocLayout = (props: DocLayoutProps) => {
const { page } = usePage();
const lang = useLang();

return (
<BaseDocLayout
{...props}
beforeDocContent={
<>
<BlogBackButton
pathname={page.routePath}
lang={lang}
LinkComp={Link}
/>
{props.beforeDocContent}
</>
}
/>
);
};

export { DocLayout, HomeLayout, Layout };

export * from '@rspress/core/theme-original';
Loading