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

@rolly-dev/witness-core

v0.2.2

Published

Authoritative native witness-state engine for Rolly ZK-Rollup (Node-API addon)

Readme

@rolly-dev/witness-core

Authoritative native witness-state engine for the Rolly ZK-Rollup, shipped to Node.js as a Node-API addon via napi-rs.

It is the single source of truth for the rollup witness state (Merkle tree, server-seed chain, TL) and processes each transaction exactly once. Node keeps only IO / RPC / orchestration. See the migration plan for the full rationale (removing the TS/Rust double-recompute and the wasm Poseidon bottleneck).

Status: scaffolding stage. The Node-API surface and a placeholder MerkleEngine handle exist; the real state, process_tx, and flush_block land in later stages.

Design

One crate, crate-type = ["cdylib", "rlib"] with napi bindings inline (no separate binding crate), mirroring how wasm-signer ships cdylib + rlib:

  • cdylib -> the .node addon consumed by the backend.
  • rlib -> native unit tests + (later) circuit differential tests live in this same crate, so engine logic is testable without going through Node.

Build

Host platform (release):

npm install     # installs @napi-rs/cli
npm run build   # -> witness-core.<platform>.node, index.js, index.d.ts

or bash build.sh.

Prebuild for Linux x64 (production target)

Production likely runs Linux x64, so the package is configured to emit a x86_64-unknown-linux-gnu artifact:

npm run build:linux-x64

Cross-compiling from macOS requires a Linux linker and the Rust target:

rustup target add x86_64-unknown-linux-gnu

Then pick one of:

  • GNU cross-linker (used here): install the GNU cross toolchain so x86_64-linux-gnu-gcc is on PATH. .cargo/config.toml already points the target's linker at it, so npm run build:linux-x64 produces a stripped witness-core.linux-x64-gnu.node ELF directly.
  • Linux x64 CI runner: run npm run build:linux-x64 there natively (.cargo/config.toml's cross-linker entry is simply unused). Recommended for release.
  • zig: cargo install cargo-zigbuild + a zig on PATH, then add --cross-compile to the napi build.

The release flow uses napi prepublish / napi artifacts to collect the per-platform .node files before publishing.

Test

npm test   # builds nothing; runs ./test.js against the already-built addon

Consuming from the backend

Same pattern as @rolly-dev/wasm-signer:

const { MerkleEngine, engineVersion } = require('@rolly-dev/witness-core');
const engine = new MerkleEngine();