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

@samtv12345/ueberdb-rs

v0.1.0

Published

Transform every database into an object key value store (Rust port)

Readme

@samtv12345/ueberdb-rs

Drop-in replacement for ueberdb2 — the multi-backend key/value abstraction Etherpad uses — re-implemented in safe Rust behind a napi-rs binding. Same Database JS class, same Settings shape, same Promise-returning method surface. Distributed as a single fat .node per platform with all 14 driver crates linked in.

Features

A single Database class wraps a Backend trait plus a wrapper layer:

  • LRU read-cache (moka) with per-Settings capacity
  • Coalescing write-buffer with periodic flush, do_bulk batching, and a snapshot/commit drain that's safe under concurrent backend updates
  • Per-key locks so different keys make progress in parallel while writes to the same key stay serialized
  • getSub / setSub for nested JSON, with TS-parity semantics (passing undefined deletes the leaf)
  • findKeys glob translation; backends with native pattern matching short-circuit
  • Atomic counters for reads/writes/cache hits/flushes/bulks via db.metrics()

Backends

All 14 ueberDB backends are ported. Each row is exercised by the same vitest conformance suite (memory and dirty-style backends from ueberDB plus per-backend testcontainers specs).

| type arg | Crate / driver | Native pattern matching | | ------------------- | --------------------- | ----------------------- | | memory | HashMap + RwLock | wrapper-side | | dirty | append-log file | wrapper-side | | dirty_git | dirty + git2 | wrapper-side | | sqlite | sqlx (sqlite) | LIKE | | rusty / rustydb | redb | wrapper-side | | postgres | tokio-postgres | LIKE | | postgrespool | tokio-postgres+bb8| LIKE | | mysql / mariadb | sqlx (mysql) | LIKE | | mssql | tiberius | LIKE | | mongodb | mongodb | regex | | redis | redis | SCAN MATCH | | couch | reqwest (HTTP API) | wrapper-side | | cassandra | scylla | wrapper-side | | elasticsearch | reqwest (HTTP API) | wildcard query | | surrealdb | reqwest (HTTP API) | wrapper-side |

JS API

import { Database } from '@samtv12345/ueberdb-rs'

const db = new Database('postgres', {
  host: 'localhost',
  user: 'ueberdb',
  password: 'ueberdb',
  database: 'ueberdb',
}, {
  cache: 1000,        // LRU capacity (0 disables)
  writeInterval: 100, // ms between background flushes (0 disables)
  bulkLimit: 100,     // max ops per bulk flush
})

await db.init()
await db.set('key', { a: 1 })
const value = await db.get('key')
const keys = await db.findKeys('key:*', null)
await db.setSub('key', ['a'], 2)
await db.flush()
await db.close()

Testing

The conformance suite under __test__/ is a port of ueberDB's test/lib, parameterized over {readCache, writeBuffer} × per-backend container, and runs ~80 cases per backend. The networked specs spin up the right Docker image via testcontainers.

pnpm install
pnpm build:debug
pnpm test                          # all backends
pnpm test __test__/sqlite.spec.ts  # one backend
cargo test --lib                   # Rust unit tests for the wrapper layer

Status

@samtv12345/ueberdb-rs is a fresh package name; the legacy TypeScript implementation keeps publishing under ueberdb2 until consumers have migrated. The CI matrix exercises every backend's conformance spec on each push.

License

Apache-2.0