Skip to content
SPECIFICTION
Get listed

Rslib

lib.rsbuild.dev

Free plan WebWindowsmacOSLinuxAPI
Visit lib.rsbuild.dev
Spec score 8.6 #2 of 27 in JavaScript Build Tools

What it is

Rslib is a free, open-source tool for developing JavaScript packages and UI component libraries. Based on Rsbuild and powered by Rspack, it integrates Rust-based tools including SWC and Lightning CSS. It supports bundle and bundleless build modes and outputs ESM, CJS, UMD, Module Federation, and IIFE formats. Framework integrations support component libraries for React, Vue, Svelte, and Solid. Rslib can generate TypeScript declaration files, including isolated declarations, though declaration generation is not enabled by default. Plugin support includes Rsbuild, Rspack, and webpack plugins. Its development integrations include Rstest for testing, Storybook for component development, Rspress for documentation and component previews, and Rsdoctor for build analysis. The quick-start guide lists Node.js, Deno, and Bun as runtime options, while Rslib v1 requires Node.js 20.19+ or 22.12+. It is available for API, Linux, macOS, web, and Windows, and is released under the MIT license.

Spec sheet

Purpose
Rslib is an Rsbuild-based tool for developing JavaScript libraries and UI component libraries.Read 7 Oct 2026 · lib.rsbuild.dev
License
Rslib is free and open source software released under the MIT license.Read 7 Oct 2026 · lib.rsbuild.dev
Maker
The official site identifies ByteDance Inc. in its copyright notice.Read 7 Oct 2026 · lib.rsbuild.dev
Build analysis
The Rslib guide describes using Rsdoctor to inspect build outputs and the build process.Read 7 Oct 2026 · lib.rsbuild.dev
Build engine
Rslib is based on Rsbuild and uses Rspack, with SWC and Lightning CSS among the Rust-based tools it integrates.Read 7 Oct 2026 · lib.rsbuild.dev
Build modes
Rslib supports bundle and bundleless build modes.Read 7 Oct 2026 · lib.rsbuild.dev
Community support
The project invites users to chat with the Rstack team and community on Discord.Read 7 Oct 2026 · lib.rsbuild.dev
Component development
Rslib integrates with Storybook through the Rsbuild-powered builder, which can derive its configuration from an Rslib config file.Read 7 Oct 2026 · lib.rsbuild.dev
Declaration files
Rslib supports generating TypeScript declaration files, and declaration generation is not enabled by default.Read 7 Oct 2026 · lib.rsbuild.dev
Development integrations
The documentation describes integrations with Storybook for component development, Rspress for documentation, Rstest for testing, and Rsdoctor for build analysis.Read 7 Oct 2026 · lib.rsbuild.dev
Documentation integration
Rslib can be used with Rspress to preview components and display API documentation from library sources and typings.Read 7 Oct 2026 · lib.rsbuild.dev
Framework support
Rslib supports building component libraries for React, Vue, Svelte, and Solid through its framework integrations.Read 7 Oct 2026 · lib.rsbuild.dev
Frameworks
Rslib supports React, Vue, Svelte, and Solid component libraries through plugins.Read 7 Oct 2026 · lib.rsbuild.dev
Output formats
Rslib supports ESM, CJS, UMD, Module Federation, and IIFE output formats.Read 7 Oct 2026 · lib.rsbuild.dev
Performance
Rslib is powered by Rspack and integrates Rust-based tools including SWC and Lightning CSS.Read 7 Oct 2026 · lib.rsbuild.dev
Plugin integrations
Rslib supports Rsbuild plugins, Rspack plugins, and webpack plugins.Read 7 Oct 2026 · lib.rsbuild.dev
Runtime requirement
Rslib v1 requires Node.js 20.19+ or 22.12+.Read 7 Oct 2026 · lib.rsbuild.dev
Runtime support
The quick start guide says Rslib can use Node.js, Deno, or Bun as its JavaScript runtime.Read 7 Oct 2026 · lib.rsbuild.dev
Runtimes
The quick-start guide lists Node.js, Deno, and Bun as supported JavaScript runtimes.Read 7 Oct 2026 · lib.rsbuild.dev
Scaffold templates
The create-rslib templates include Node.js, React, Vue, Svelte, and Solid projects.Read 7 Oct 2026 · lib.rsbuild.dev
Testing integration
New Rslib projects include Rstest as the test framework by default, and an official adapter can inherit Rslib configuration.Read 7 Oct 2026 · lib.rsbuild.dev
Type declarations
Rslib supports generating TypeScript declaration files, including isolated declarations.Read 7 Oct 2026 · lib.rsbuild.dev
Version requirement
Rslib v1 requires Node.js 20.19+ or 22.12+.Read 7 Oct 2026 · lib.rsbuild.dev
Who it is for
Rslib is aimed at developers creating JavaScript packages, including Node.js packages and component libraries for multiple UI frameworks.Read 7 Oct 2026 · lib.rsbuild.dev

Plans and prices

Free and open source Free MIT license; no paid tiers stated Read 7 Oct 2026 · lib.rsbuild.dev

Every Rslib plan and price →

Strong points and limits

Strong points

  • Offers bundle and bundleless build modes.
  • Supports five output formats, including ESM and CJS.
  • Integrates with React, Vue, Svelte, and Solid.
  • Free and open source under the MIT license.

Limits

  • Declaration generation is not enabled by default.
  • Rslib v1 requires Node.js 20.19+ or 22.12+.

Who it suits

Rslib suits developers building JavaScript packages or component libraries for React, Vue, Svelte, or Solid. It also fits teams seeking a build tool with integrations for testing, documentation, component development, and build analysis.

Rslib in depth

Read the full write-up

Overview

Rslib is a build tool for JavaScript packages, including UI component libraries. It is best suited to developers who want framework integrations and several output options within an Rsbuild-based workflow. Its breadth is useful, but v1’s Node.js floor and opt-in declaration generation are practical adoption checks.

Key features

Authors can choose bundle or bundleless builds and produce ESM, CJS, UMD, Module Federation, or IIFE output. That flexibility helps when a package must serve different consumers, though teams with a single, narrow target may not need the full range. TypeScript support, tree shaking, code splitting, and source maps round out the build capabilities.

Framework integrations cover React, Vue, Svelte, and Solid, with starter templates also available for Node.js packages. That makes Rslib a strong fit for component authors working across UI ecosystems; it is less compelling if the project needs only a framework-agnostic build and none of those integrations.

Rslib is based on Rsbuild and uses Rspack, alongside Rust-based tools including SWC and Lightning CSS. It accepts Rsbuild, Rspack, and webpack plugins, which can help teams reuse extensions. For the surrounding workflow, Rslib integrates with Rstest for testing, Storybook for component development, Rspress for previews and API documentation, and Rsdoctor for build analysis. Those connections are useful for teams already assembling a library workflow from these tools, but they are not a reason on their own to adopt Rslib.

TypeScript declaration files, including isolated declarations, are supported but are not generated by default. Teams publishing types need to enable generation deliberately. New projects include Rstest as the default test framework, and the official adapter can inherit Rslib configuration.

Pricing

Rslib is free and open source under the MIT license. Its Free and open source plan costs nothing; no paid tiers are stated. There are no plan-based feature or seat trade-offs described, so cost is not a differentiator between usage tiers.

Platforms

Rslib is categorized for API, Linux, macOS, web, and Windows. Its quick-start guide names Node.js, Deno, and Bun as JavaScript runtimes, but Rslib v1 requires Node.js 20.19+ or 22.12+. That requirement is the key constraint for teams considering v1: a project or build environment on an older Node.js release will need an upgrade or a different choice.

Who it's for

Rslib suits developers shipping JavaScript packages or component libraries, particularly when they need multiple module formats, framework-specific support, or a connected workflow for testing, documentation, component development, and build inspection. It is a weaker fit for teams that cannot meet the v1 Node.js requirement or need declarations generated without configuring the build.

Pros and cons

Pros: Multiple build modes and output formats give library authors options for different consumers.

Pros: React, Vue, Svelte, and Solid integrations, plus templates, support component-library work across frameworks.

Pros: Plugins and integrations connect Rslib with existing Rsbuild, Rspack, and webpack extensions and related development tools.

Cons: Rslib v1 requires Node.js 20.19+ or 22.12+, which can rule it out for older environments.

Cons: Declaration generation is off by default, so TypeScript package publishers must enable it themselves.

Alternatives

JavaScript Build Tools is a broader directory of options. Consider Rolldown if you want a free, open-source alternative with Android among its supported platforms. SWC is a free, open-source Rust-based developer toolchain; choose it when that broader toolchain is a better fit than Rslib’s library-focused workflow. esbuild offers a free MIT-licensed option as a native executable or WebAssembly version. Vite is another free, open-source choice. Rspack may suit teams looking for the build engine Rslib itself is based on, rather than Rslib’s library-specific modes and integrations. Terser is a free JavaScript minifier toolkit. Turbopack is included in Next.js, with no separate price stated. Google Closure Compiler is a free, open-source Java application, Bazel library, and NPM package.

Verdict

Choose Rslib for JavaScript packages or component libraries when you want several output formats, support for four UI frameworks, and integrations across the build and development workflow at no cost. Look elsewhere if your environment cannot meet its Node.js v1 requirement or you need declaration files enabled by default.

Verdict

Rslib brings multiple build formats and framework integrations together for JavaScript libraries. Check its Node.js version requirement and enable declaration generation if your project needs TypeScript declarations.

Where Specifiction places it

Alternatives to RslibAll alternatives →