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

slatedb-node

v0.2.1

Published

Node.js bindings for SlateDB via napi-rs

Readme

slatedb-node

High-performance Node.js bindings for SlateDB implemented as a native Rust extension using napi-rs.

  • Native extension (no subprocess bridge)
  • Async TypeScript API
  • Supports SlateDB DB/Reader/Snapshot/Transaction/Admin primitives
  • Compiled with slatedb feature all (object store + compression feature set)

Installation

pnpm add slatedb-node

Quick Start

import { WriteBatch, open } from "slatedb-node";

const db = await open({ path: "example-db", url: "memory:///" });

await db.put("user:1", "alice");
console.log((await db.get("user:1"))?.toString());

const batch = new WriteBatch();
batch.put("user:2", "bob");
batch.delete("user:1");
await db.write(batch);

const iter = await db.scanPrefix("user:");
for await (const [key, value] of iter) {
  console.log(key.toString(), value.toString());
}

await db.close();

Opening Databases

import { open } from "slatedb-node";

const db = await open({
  path: "my-db",
  url: "file:///tmp/slatedb-store",
  settingsPath: "./SlateDb.toml", // optional
  settings: {
    flush_interval: "50ms",
    manifest_poll_interval: "1s",
  }, // optional object overrides
});

Reader and Admin APIs

import { open, openAdmin, openReader } from "slatedb-node";

const db = await open({ path: "my-db", url: "file:///tmp/slatedb-store" });
const checkpoint = await db.createCheckpoint("durable");

const reader = await openReader({
  path: "my-db",
  url: "file:///tmp/slatedb-store",
  checkpointId: checkpoint.id,
});

const admin = await openAdmin({ path: "my-db", url: "file:///tmp/slatedb-store" });
console.log(await admin.listCheckpoints());

await reader.close();
await db.close();

Errors

Errors are mapped to typed classes:

  • TransactionError
  • ClosedError
  • UnavailableError
  • InvalidError
  • DataError
  • InternalError

Development

Requirements:

  • Node.js 20+
  • Rust toolchain
  • pnpm

Commands:

pnpm install
pnpm run build
pnpm test

Prebuilt Binaries

The package uses @napi-rs/cli optional dependency packages (like esbuild/swc) so the main package stays small and installs only the binary for the current platform.

Generated optional packages:

  • macOS x64 / arm64
  • Linux x64 / arm64 (gnu + musl)
  • Windows x64 / arm64 (msvc)

The generated package names are:

  • slatedb-node-darwin-x64
  • slatedb-node-darwin-arm64
  • slatedb-node-linux-x64-gnu
  • slatedb-node-linux-x64-musl
  • slatedb-node-linux-arm64-gnu
  • slatedb-node-linux-arm64-musl
  • slatedb-node-win32-x64-msvc
  • slatedb-node-win32-arm64-msvc

Publishing

publish.yml builds all native targets, downloads artifacts, creates per-platform npm package dirs, and runs npm publish.

prepublishOnly runs napi pre-publish -t npm, which updates optionalDependencies and publishes the platform packages alongside the main package.