npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mochi-framework/rsvelte

v0.1.0

Published

Opt-in rsvelte (Rust Svelte compiler) backend for mochi-framework.

Readme

@mochi-framework/rsvelte

Opt-in rsvelte backend for mochi-framework. rsvelte is a Rust port of the Svelte 5 compiler built on OXC; this package adapts it to Mochi's compiler-backend contract so component compilation runs natively instead of through the JavaScript svelte/compiler.

Install

bun add -d @mochi-framework/rsvelte

Use

await Mochi.serve({
  svelteCompiler: 'rsvelte',
  routes,
});

Or without touching code — the env var wins over the option, which is handy for A/B timing an existing app:

MOCHI_SVELTE_COMPILER=rsvelte bun run build

If this package isn't installed (or its native binary won't load on the current platform), Mochi logs a warning and falls back to svelte/compiler. Builds never fail over it.

What is and isn't swapped

Only compile() and compileModule() run on rsvelte. Mochi's island preprocessor walks a real Svelte AST with zimmerframe, and rsvelte's parse() returns a JSON string rather than an upstream-shaped AST — so parsing and preprocessing always stay on the official compiler. The output rsvelte emits is verified byte-identical to upstream by this package's test suite.

Caveats

  • Pre-1.0. rsvelte's own README warns that APIs and behaviour may change without notice.
  • Function-valued compiler options are ignored. cssHash and warningFilter cannot cross the native boundary. This package strips them and warns once. For cssHash, use rsvelte's cssHashOverride: '<hash>' to force a fixed value.
  • $derived(await …) in dev client builds loses Svelte's dev-only reactivity-loss instrumentation. Server output and non-dev client output match upstream byte-for-byte.
  • compileModule() output differs cosmetically — a vVERSION placeholder in the generated header comment and different printer whitespace. Semantically identical.
  • Platforms. Prebuilt binaries cover macOS arm64/x64, Linux x64/arm64 (glibc) and Windows x64 (MSVC). There is no musl build, so Alpine-based images fall back to svelte/compiler.
  • Switching backends invalidates compiled output. Mochi's in-memory compile cache is keyed on the backend, but a prebuilt manifest.json is not — run bun run clean and rebuild after changing svelteCompiler.