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

rusm-ts

v0.7.0

Published

The TypeScript guest API for RUSM: the Process actor API, the spawn typed-client, websocket(), and types.

Readme

rusm — the TypeScript guest API

The guest API for RUSM TypeScript components: the Process actor API, the spawn typed-client, the websocket() serving helper, and the types. The Rust twin is the rusm-rs crate — they share one JSON wire and interoperate.

bun add rusm-ts
import { Process, spawn } from "rusm-ts";
import type { Calc } from "../calc";       // type-only: the service's published contract

const calc = spawn<Calc>("calc");          // spawn a service by name, typed client
const sum = await calc.add(2, 3);          // a call
for await (const n of calc.countTo(3)) {}  // a stream
await calc.work((pct) => updateBar(pct));  // a callback (stays in the caller)

The js-runner injects Process/spawn as globals and polyfills the Web APIs (URL, TextEncoder, Headers, ReadableStream, AbortController, crypto, console, and a capability-gated streaming fetch); this package re-exports Process/spawn/supervise as a normal module and ships the types. receive/Stream.read are async (await); pids are bigint.

Serving

A component is served by declaring it in rusm.toml; you just write the handler. HTTP/SSE are zero-dependency web-standard handlers:

export default function handle(request: Request): Response {
  return new Response("hello\n", { headers: { "content-type": "text/plain" } });
}

WebSockets use the websocket() helper — one instance serves every connection, reply with socket.send(…):

import { websocket } from "rusm-ts";

export default websocket({
  open(socket) {
    socket.send("welcome\n");
  },
  message(socket, data) {
    socket.send(data); // echo this connection's frame
  },
  close(socket) {
    // disconnect — clean or dropped (optional)
  },
});

Building

rusm build bundles each components/<name>/index.ts with Bun → wasm/<name>.js (precompiled to QuickJS bytecode), run on the shared rquickjs runner. Add the standard DOM lib to your tsconfig.json ("lib": ["ES2022", "DOM"]) so the polyfilled Web APIs are typed. See the RUSM docs and rusm new to scaffold an app.