rslib is a free, open source build & deployment project written in TypeScript and released under MIT. It has 1,043 GitHub stars, 67 forks and 30 open issues, and was last pushed 25 hours ago. On this registry it ranks #60 of 84 tracked projects in Build & Deployment, with 5 head-to-head comparisons available. It gained 4 stars over the last 30 tracked days.

What is rslib?

Rslib is an MIT-licensed library development tool built on Rsbuild that lets developers create JavaScript libraries and UI component libraries with zero configuration, across React, Vue, Svelte, and Solid.

What it is

Rslib is a library development tool based on Rsbuild, and it belongs to Rstack, the unified JavaScript toolchain that also holds the Rspack bundler, the Rsbuild build tool, the Rspress static site generator, the Rsdoctor build analyzer, the Rstest testing framework, and the Rslint linter. It supplies tool integrations and best practices that run across building, debugging, documentation, and testing for the whole life of a library, rather than stopping at the bundling step. It is written in TypeScript and is decoupled from frontend UI frameworks, so React, Vue, Svelte, Solid, and other targets can be built through plugins under one consistent configuration and workflow. Its build engine is Rspack, and it brings in Rust-based community tooling including SWC and Lightning CSS.

The concrete problem it solves is the configuration burden of packaging a library. Authors must otherwise decide output formats, targets for different runtimes, distribution methods, and compatibility with downstream build tools, then maintain that setup themselves as the project grows. Rslib replaces that per-project bundler configuration with out-of-the-box tooling that builds libraries with zero configuration, while offering a set of semantic build configurations that extend as needs appear. Because it accepts Rsbuild plugins, Rspack plugins, and webpack plugins, existing plugin choices and engineering practices carry over instead of being rewritten. In the JavaScript and TypeScript ecosystem this makes Rslib the library-facing layer of the Rstack toolchain, sitting above Rspack and Rsbuild and complementing Rspress, Rstest, and Rsdoctor.

Key capabilities

  • Zero-configuration library builds, with semantic build configurations that extend as project requirements grow.
  • Performance-oriented builds powered by Rspack, integrating the Rust-based SWC and Lightning CSS tools.
  • Plugin compatibility across the Rsbuild plugin ecosystem, Rspack plugins, and webpack plugins.
  • Flexible output configuration for different runtimes, distribution methods, and downstream build tools, covering varied library publishing and consumption patterns.
  • Framework-agnostic component library builds for React, Vue, Svelte, and Solid through plugins.
  • Membership in the Rstack toolchain alongside Rspack, Rsbuild, Rspress, Rsdoctor, Rstest, and Rslint.
  • Documentation split by major version, with Rslib v1 docs at https://rslib.rs and Rslib v0 docs at https://v0.rslib.rs.

Who uses it and how

  • JavaScript and TypeScript library authors who publish packages and want build, debugging, documentation, and testing integrations in one place.
  • UI component library maintainers shipping for React, Vue, Svelte, or Solid who want one configuration and workflow across frameworks.
  • Teams already invested in webpack plugins, or in Rspack and Rsbuild plugins, who reuse those plugins rather than changing build approach.
  • Adopters of the wider Rstack toolchain, pairing Rslib for library output with Rsbuild for builds, Rspress for docs, Rstest for testing, Rsdoctor for build analysis, and Rslint for linting.
  • Documentation and demo workflows built on the Rsbuild-powered Storybook builder, storybook-rsbuild, or drawing on rstack-examples and agent-skills.

Getting started

Rslib is installed and configured through the Rslib v1 documentation at https://rslib.rs, while projects staying on the earlier major version should follow the Rslib v0 docs at https://v0.rslib.rs. The repository's Contributing Guide covers contribution setup, and the Rstack Discord is the community channel.

How it compares

Within the tools named here, Rslib sits above the Rspack bundler and the Rsbuild build tool in the same Rstack toolchain, serving library publishing rather than application bundling or app build orchestration. It reaches across to webpack through plugin support, so existing webpack plugin choices stay usable inside an Rslib build. The project also credits esbuild and mini-css-extract-plugin among the open source projects its work derives from or is inspired by.

When to use it — and when not to

Choose Rslib when the deliverable is a library or component library that must be built into several output shapes, and when the Rsbuild, Rspack, and webpack plugin ecosystems matter to the setup. Do not pick it for application builds, which are the job of Rsbuild and Rspack, nor if the project sits outside the JavaScript toolchain or cannot adopt Node-based build tooling. There is no service to self-host, so the running cost is the CI and developer machines that execute the build rather than any database or storage; note also that documentation is split between the v1 and v0 sites, which matters when maintaining code written against the older version.

project readme (upstream, from github) — read inline
Rslib Banner

Rslib

Discord channel npm version downloads node version license Ask DeepWiki

English | 简体中文

Rslib is a library development tool based on Rsbuild.

It gives developers a simple way to create JavaScript libraries and UI component libraries, and provides tool integrations and best practices for building, debugging, documentation, and testing throughout library development.

🔥 Features

Rslib has the following features:

  • Easy to configure: Out-of-the-box tooling enables developers to build libraries with zero configuration. Rslib also provides a set of semantic build configurations that can be extended as project needs grow.

  • Performance-focused: Powered by Rspack, it integrates high-performance Rust-based tools from the community, including SWC and Lightning CSS, delivering first-class build speed and development experience.

  • Plugin ecosystem: Supports Rsbuild plugins, Rspack plugins, and webpack plugins, allowing developers to reuse existing plugin ecosystems and continue using familiar development workflows and engineering practices.

  • Flexible outputs: Designed around the diverse ways libraries are published and consumed, it supports flexible build output configuration for different runtimes, distribution methods, and downstream build tools to meet the delivery needs of different types of libraries.

  • Framework agnostic: Decoupled from frontend UI frameworks, it supports React, Vue, Svelte, Solid, and other frameworks through plugins, allowing developers to build component libraries for different frameworks with a consistent configuration and development workflow.

📚 Documentation

🦀 Rstack

Rslib is part of Rstack, the fast, unified JavaScript toolchain for developers and agents.

Name Description Version
Rspack Bundler npm version
Rsbuild Build tool npm version
Rslib Library development tool npm version
Rspress Static site generator npm version
Rsdoctor Build analyzer npm version
Rstest Testing framework npm version
Rslint Linter npm version

🔗 Links

🤝 Contribution

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

Please read the Contributing Guide.

Contributors

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.

Frequently asked questions

Is rslib free to use?

rslib is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does rslib do?

Create JavaScript libraries in a simple and intuitive way.

What is rslib written in?

rslib is primarily written in TypeScript. Its source is publicly available at https://github.com/web-infra-dev/rslib, and it has 1,043 GitHub stars.