baseballyama/rsvelte

Rust-powered Svelte ecosystem

Rust

221

4,686 commits

updated Sep 22, 2026

See the code

README

rsvelte

rsvelte is a Rust port of the official Svelte 5 compiler and related developer tools. It aims to match the official compiler output and work directly with the OXC toolchain.

Website | Playground | Compatibility | Benchmarks

[!WARNING] rsvelte passes all in-scope fixtures in the official Svelte 5 test suite, but it is still pre-1.0. APIs and behavior may change. Test it carefully before using it in production.

Why rsvelte

Most native JavaScript tools only understand JavaScript and TypeScript files. They must call the JavaScript-based Svelte compiler to work with .svelte files. rsvelte implements the compiler and related tools in Rust.

This lets tools such as oxlint, oxfmt, Rolldown, and tsgo add Svelte support without starting the JavaScript compiler.

Quick start

Use the Vite plugin in a standard Vite and Svelte project:

npm install -D @rsvelte/vite-plugin-svelte
// vite.config.js
import { svelte } from "@rsvelte/vite-plugin-svelte";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [svelte()],
});

SvelteKit requires a package manager override. Do not add a second Vite plugin. See the @rsvelte/vite-plugin-svelte setup guide for the exact configuration.

Packages

Each package has its own installation guide, API details, and current limitations.

Use casePackage
Vite and SvelteKit@rsvelte/vite-plugin-svelte
Svelte compiler for JavaScript and browsers (Wasm)@rsvelte/compiler
Svelte compiler for Node.js (native N-API)@rsvelte/vite-plugin-svelte-native
Type-checking CLI@rsvelte/svelte-check
Svelte-to-TSX conversion@rsvelte/svelte2tsx
Formatting@rsvelte/fmt
Standalone linting@rsvelte/lint
Svelte diagnostics in oxlint@rsvelte/oxlint-plugin
Language server@rsvelte/language-server
VS Codersvelte
Neovim, Sublime Text, Helix, and EmacsEditor setup
Zedrsvelte Zed extension
Rust APIrsvelte
C API and other languagesrsvelte_capi

Compatibility and performance

Targeting Svelte v5.57.0 (7bc0a70fe64d). This line is updated by pnpm run update-docs.

rsvelte passes 100% of the official Svelte fixtures currently in scope. CI also compares compiler output, diagnostics, formatting, linting, TypeScript output, source maps, and generated edge cases with the official tools.

The Svelte 4-to-5 migration tool is not in scope.

Contributing

git submodule update --init --checkout --recursive
pnpm install
pnpm run generate-fixtures
cargo test --release

See CONTRIBUTING.md for requirements, test commands, debugging steps, performance tests, and pull request rules.

License

MIT

compiler
formatter
language-server
linter
svelte
svelte3
svelte5
sveltejs

Contributors

baseballyama

3,505 commits

Fancyhe1

586 commits

renovate[bot]

350 commits

baseballyama/rsvelte

Rust-powered Svelte ecosystem

Rust

221

4,686 commits

updated Sep 22, 2026

See the code

README

rsvelte

rsvelte is a Rust port of the official Svelte 5 compiler and related developer tools. It aims to match the official compiler output and work directly with the OXC toolchain.

Website | Playground | Compatibility | Benchmarks

[!WARNING] rsvelte passes all in-scope fixtures in the official Svelte 5 test suite, but it is still pre-1.0. APIs and behavior may change. Test it carefully before using it in production.

Why rsvelte

Most native JavaScript tools only understand JavaScript and TypeScript files. They must call the JavaScript-based Svelte compiler to work with .svelte files. rsvelte implements the compiler and related tools in Rust.

This lets tools such as oxlint, oxfmt, Rolldown, and tsgo add Svelte support without starting the JavaScript compiler.

Quick start

Use the Vite plugin in a standard Vite and Svelte project:

npm install -D @rsvelte/vite-plugin-svelte
// vite.config.js
import { svelte } from "@rsvelte/vite-plugin-svelte";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [svelte()],
});

SvelteKit requires a package manager override. Do not add a second Vite plugin. See the @rsvelte/vite-plugin-svelte setup guide for the exact configuration.

Packages

Each package has its own installation guide, API details, and current limitations.

Use casePackage
Vite and SvelteKit@rsvelte/vite-plugin-svelte
Svelte compiler for JavaScript and browsers (Wasm)@rsvelte/compiler
Svelte compiler for Node.js (native N-API)@rsvelte/vite-plugin-svelte-native
Type-checking CLI@rsvelte/svelte-check
Svelte-to-TSX conversion@rsvelte/svelte2tsx
Formatting@rsvelte/fmt
Standalone linting@rsvelte/lint
Svelte diagnostics in oxlint@rsvelte/oxlint-plugin
Language server@rsvelte/language-server
VS Codersvelte
Neovim, Sublime Text, Helix, and EmacsEditor setup
Zedrsvelte Zed extension
Rust APIrsvelte
C API and other languagesrsvelte_capi

Compatibility and performance

Targeting Svelte v5.57.0 (7bc0a70fe64d). This line is updated by pnpm run update-docs.

rsvelte passes 100% of the official Svelte fixtures currently in scope. CI also compares compiler output, diagnostics, formatting, linting, TypeScript output, source maps, and generated edge cases with the official tools.

The Svelte 4-to-5 migration tool is not in scope.

Contributing

git submodule update --init --checkout --recursive
pnpm install
pnpm run generate-fixtures
cargo test --release

See CONTRIBUTING.md for requirements, test commands, debugging steps, performance tests, and pull request rules.

License

MIT

compiler
formatter
language-server
linter
svelte
svelte3
svelte5
sveltejs

Contributors

baseballyama

3,505 commits

Fancyhe1

586 commits

renovate[bot]

350 commits

Languages

Rust

88.0%

JavaScript

8.1%

Svelte

3.0%