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 🙏

© 2025 – Pkg Stats / Ryan Hefner

sikiopipe

v0.1.0

Published

Zero‑copy‑ish IPC & RPC between Web Workers and Node.js worker_threads with SAB+Atomics fast path and postMessage fallback.

Readme

SikioPipe

NPM Version License TypeScript Targets Size

Zero‑copy‑ish IPC & RPC between Web Workers and Node.js worker_threads with a SharedArrayBuffer + Atomics fast path and postMessage fallback.

Features

  • SAB + Atomics fast path: Uses SharedArrayBuffer-backed SPSC rings with a pooled block allocator when eligible.
  • Fallback transport: Falls back to postMessage when SAB isn’t available or allowed.
  • Channels: Send raw Uint8Array frames, with borrowed receives for low-copy hot paths.
  • RPC: Type-safe-ish remote proxies (rpc(conn).wrap<T>()) with a tiny server (rpc(conn).expose(...)).
  • Streaming RPC: AsyncIterable<Uint8Array> arguments and return values are streamed with backpressure.
  • Configurable: mode, blockSize, blockCount, handshake timeout, ping intervals.

Installation

npm i sikiopipe

or

pnpm add sikiopipe

or

yarn add sikiopipe

Quick Start

Node.js (worker_threads)

main.ts

import { spawnWorker, rpc } from "sikiopipe/node";

type Api = {
  add(a: number, b: number): number;
};

const conn = await spawnWorker(new URL("./worker.js", import.meta.url));
const api = rpc(conn).wrap<Api>();

console.log(await api.add(1, 2));

conn.close();
await conn.terminate();

worker.js

import { acceptConnection, rpc } from "sikiopipe/node";

const conn = await acceptConnection();
rpc(conn).expose({
  add(a: number, b: number) {
    return a + b;
  },
});

Browser (Web Workers)

main.ts

import { getSabEligibility, rpc, spawnWorker } from "sikiopipe/browser";

console.log(getSabEligibility());

type Api = {
  ping(): string;
};

const conn = await spawnWorker(new URL("./worker.js", import.meta.url));
const api = rpc(conn).wrap<Api>();

console.log(await api.ping());

conn.close();
await conn.terminate();

worker.js

import { acceptConnection, rpc } from "sikiopipe/browser";

const conn = await acceptConnection();
rpc(conn).expose({
  ping() {
    return "pong";
  },
});

Transports

| Mode | Behavior | Notes | |------|----------|-------| | auto | Selects SAB when eligible, otherwise postMessage | Default | | sab | Forces SAB transport | In browsers requires COOP/COEP (cross-origin isolation) | | postMessage | Forces postMessage transport | Always available |

Zero-copy-ish data path

Borrowed receive (avoid per-message slice() allocations):

import { channel } from "sikiopipe";

const ch = channel(conn);

for await (const chunk of ch.recvBorrowed()) {
  try {
    onBytes(chunk.bytes);
  } finally {
    chunk.release();
  }
}

Transfer-backed send (only on postMessage transport):

import { channel, createTransferPayload } from "sikiopipe";

const ch = channel(conn);

const data = new Uint8Array([1, 2, 3]);
const { payload } = createTransferPayload(data.byteLength);
payload.set(data);

await ch.sendTransfer(payload);

Building from Source

npm install
npm run build

Contributing

Found a bug or have a feature request? Open an Issue. PRs are welcome!

License

This project is licensed under AGPLv3 (AGPL-3.0-only).