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

bunostrdb

v0.2.0

Published

Low-level Bun FFI bindings for nostrdb (the embedded nostr database backed by LMDB).

Readme

bunostrdb

Docs npm-version License

Built with Bun Built with TypeScript Linted with Oxc Formatted with Oxc Tested with Vitest Tasks via Justfile Conventional Commits

Bun FFI bindings for nostrdb — the unfairly fast embedded nostr database backed by LMDB.

Linux x86_64 only. This package does not support macOS, Windows, or non-x64 Linux. The native library is built from vendored C sources and loaded via bun:ffi dlopen().

npm consumers: prebuilt binaries. bun add bunostrdb gives you prebuilt Linux x86_64 shared objects — no C toolchain required. The npm tarball intentionally does not include the full vendored dependency tree needed to rebuild libnostrdb.so from source. To rebuild, clone the monorepo (git clone --recursive) and build from the repository root.

This package has a single runtime dependency (flatbuffers). The command-line interface lives in bunostrdb-cli at the repository root and depends on this package — installing the CLI never forces argument-parsing dependencies onto library consumers.

Docs: bunostrdb docs — getting started, resource management, architecture.

Prerequisites

  • Bun v1.4.0+ (required for FFI; tested on 1.4.0)
  • Linux x86_64 (enforced at load time — process.platform === "linux" and process.arch === "x64")
  • A working C toolchain (build-essential or equivalent), make, and GNU coreutils (file, grep, find) — source builds only; npm consumers skip this

Native toolchain assumptions (source builds only)

  • Compiler: GCC or Clang with C11 support (-fPIC is applied by the Makefile)
  • Make: GNU Make (not BSD Make)
  • The struct sizes in src/ffi.ts are hard-coded for the Linux x86_64 layout. (The vendored Makefile contains Darwin branches for byteswap.h portability, but this project never produces non-Linux artifacts.)

glibc compatibility note: The native binaries are dynamically linked against glibc. Systems with glibc < 2.38 (Debian 11 "bullseye", Ubuntu 20.04 "focal", RHEL 8, and older) are not supported even if they run Linux x86_64. The error at dlopen() time will be: libnostrdb.so: cannot open shared object file: GLIBC_2.38 not found.

Install

bun add bunostrdb
# or
pnpm add bunostrdb
# or
npm install bunostrdb

Source build (monorepo)

# 1. Clone and install (from the repository root)
git clone --recursive https://relay.ngit.dev/npub1m0std0zlg4d9gldykfjys342lz85ve2rvpqnpk86vcnzts02m68sl502vt/bunostrdb.git
cd bunostrdb
bun install

# 2. Build the native libraries (upstream lib + Bun shim)
bun run build:native

# 3. Build the TypeScript sources
bun run build:all

# 4. Run tests (from the repository root)
bun test

For npm consumers

bun add bunostrdb gives you the prebuilt Linux x86_64 binaries (see the callout at the top).

Continuous integration. Because the package ships ABI-sensitive native binaries, downstream consumers should still pin a known-good version and re-validate before upgrading Bun, glibc, or the vendored nostrdb commit.

License

Distributed under the BSD-3 license.

Support

If bunostrdb is useful, support development with any amount using Monero:

8AfaZJa3HRnS4F9yRzRK9iDcVPm17WA33EEZjWfREkkoUGWbLfA79aeSWoAj21B7swMW9bb8iWdgw8mtjJ5y4yMT7z6AmCc