GitPedia

Rslib

Create JavaScript libraries in a simple and intuitive way.

From web-infra-devยทUpdated June 16, 2026ยทView on GitHubยท

Rslib is a library development tool that leverages the well-designed configurations and plugins of [Rsbuild](https://rsbuild.rs), empowering library developers to take advantage of the extensive knowledge and ecosystem of webpack and Rspack. The project is written primarily in TypeScript, distributed under the MIT License license, first published in 2024. Key topics include: build-tool, bundler, frontend, javascript, library.

Latest release: v0.23.0
<picture> <img alt="Rslib Banner" src="https://assets.rspack.rs/rslib/rslib-banner.png"> </picture>

Rslib

<p> <a href="https://discord.gg/FQfm7VqU"><img src="https://img.shields.io/badge/chat-discord-blue?style=flat-square&logo=discord&colorA=564341&colorB=F8F5FF" alt="Discord channel" /></a> <a href="https://npmjs.com/package/@rslib/core?activeTab=readme"><img src="https://img.shields.io/npm/v/@rslib/core?style=flat-square&colorA=564341&colorB=F8F5FF" alt="npm version" /></a> <a href="https://npmcharts.com/compare/@rslib/core?minimal=true"><img src="https://img.shields.io/npm/dm/@rslib/core.svg?style=flat-square&colorA=564341&colorB=F8F5FF" alt="downloads" /></a> <a href="https://nodejs.org/en/about/previous-releases"><img src="https://img.shields.io/node/v/@rslib/core.svg?style=flat-square&colorA=564341&colorB=F8F5FF" alt="node version"></a> <a href="https://github.com/web-infra-dev/rslib/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=F8F5FF" alt="license" /></a> <a href="https://deepwiki.com/web-infra-dev/rslib"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki" /></a> </p>

English | ็ฎ€ไฝ“ไธญๆ–‡

Rslib is a library development tool that leverages the well-designed configurations and plugins of Rsbuild, empowering library developers to take advantage of the extensive knowledge and ecosystem of webpack and Rspack.

Rslib aims to provide library developers with:

  • Easy Library Creation: Easily create high-quality JavaScript and TypeScript libraries in a simple and intuitive way.
  • Simple Build Configuration: Provides out-of-the-box build capabilities to meet the diverse needs of library development scenarios with simple configurations.
  • Comprehensive Development Workflow: Contains best practices for building, debugging, documentation, and testing during library development to help improve development efficiency and experience.

๐Ÿ”ฅ Features

Rslib has the following features:

  • Compilation of diverse languages: TypeScript, JSX, Sass, Less, CSS Modules, Wasm, and more.
  • Flexible build modes: Bundle and bundleless options to meet varying needs.
  • Multiple output formats: ESM, CJS, and UMD for maximum compatibility.
  • Declaration file generation: Including isolated declarations.
  • Advanced features: Module Federation, asset compression, PostCSS, Lightning CSS, and more.

๐Ÿ“š Documentation

๐ŸŽฏ Ecosystem

Rslib is implemented based on Rsbuild and fully reuses the capabilities and ecosystem of Rsbuild.

The following diagram illustrates the relationship between Rslib and other tools in the ecosystem:

<img src="https://assets.rspack.rs/rsbuild/assets/rspack-stack-layers.png" alt="Rspack stack layers" width="760" />

๐Ÿ“š Getting started

To get started with Rslib, see the Quick start.

๐Ÿฆ€ Rstack

Rstack is a unified JavaScript toolchain centered on Rspack, with high performance and consistent architecture.

NameDescriptionVersion
RspackBundler<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>
RsbuildBuild 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>
RslibLibrary 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>
RspressStatic 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>
RsdoctorBuild 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>
RstestTesting 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>
RslintLinter<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>

๐Ÿค Contribution

[!NOTE]
We highly value any contributions to Rslib!

Please read the Contributing Guide.

Contributors

<a href="https://github.com/web-infra-dev/rslib/graphs/contributors" target="_blank"> <img src="https://contrib.rocks/image?repo=web-infra-dev/rslib&columns=24"> </a>

Code of conduct

This repo has adopted the ByteDance Open Source Code of Conduct. Please check Code of Conduct for more details.

๐Ÿง‘โ€๐Ÿ’ป Community

Come and chat with us on Discord! The Rstack team and users are active there, and we're always looking for contributions.

๐Ÿ™ Credits

Parts of Rslib are derived from or inspired by many excellent open source projects. We sincerely appreciate the work of these projects and the ideas they have shared with the community:

๐Ÿ“– License

Rslib is licensed under the MIT License.

Contributors

Showing top 12 contributors by commit count.

View all contributors on GitHub โ†’

This article is auto-generated from web-infra-dev/rslib via the GitHub API.Last fetched: 6/17/2026