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

@v_m_v/finvm

v1.2.0

Published

FinVM — a universal deterministic register-based virtual machine.

Readme

FinVM

A universal deterministic virtual machine implemented in PureScript. FinVM is a register-based bytecode VM designed as a substrate for auditable workflows, state machines, and distributed systems where the same Program + Input + State must always produce the exact same Output + Trace.

Key properties

  • Deterministic — no wall-clock, no RNG, no ordering nondeterminism. Logical ticks replace time; collections are canonically sorted.
  • Register-based — O(1) register access; each function declares a fixed registerCount.
  • BigInt-native — standard integers are arbitrary precision. Also supports fixed-point (VFixed) and rational (VRational) numerics.
  • Pure core — the VM never touches the filesystem, network, or OS. Side effects are emitted as data ("Intents") or handled through explicit FFI builtins.
  • Concurrent — Erlang-style lightweight processes with message passing and mailboxes.

Install

npm install        # installs JS deps (esbuild, purescript, spago)

Build

npm run build      # spago build + esbuild bundle -> dist/finvm-core.js

Test

npm test           # PureScript spec suite (spago test) + JS DB tests

Benchmark

npm run build      # required: the benchmark imports the compiled VM from output/
npm run bench      # FinVM vs native JS, and FinVM DB vs native JS data structures
# tune with env vars: VM_ITERS=20000 DB_SIZE=20000 REPS=5 npm run bench

The benchmark runs an arithmetic loop through the VM and compares it to the same loop in native JS (with big-integer and with Number), and compares the FinVM database (insert / indexed query / SHA-256 state hash) against an equivalent native JS Map+index. FinVM is a safe, deterministic tree-walking interpreter — it trades raw speed for determinism and auditability, so expect the VM to be orders of magnitude slower than native code while the DB stays within a small constant factor.

CLI usage

After building (dist/finvm-core.js is the entry; bin/finvm.js is the executable):

finvm run <file.json>   # run a JSON bytecode program
finvm bench             # run the built-in statistics/graph benchmarks

Performance mode

For throughput runs, add "performanceMode": true at the top level of the program JSON. This disables per-step execution tracing and proof-trace recording (the main per-instruction overhead) while producing identical results — determinism is preserved; only the diagnostic trace is suppressed. Leave it off (the default) when you need traces for debugging or replay. See npm run bench for the measured speedup.

The runner prints a JSON result and exits non-zero if the program fails or the file cannot be read:

$ finvm run test/fixtures/cli-smoke.json
Loading program from: test/fixtures/cli-smoke.json
{"status":"completed","steps":5,"result":{"int":"42"},"state":{"answer":{"int":"42"}}}

Minimal program

A program is JSON, using the tagless/positional form the runner accepts (see docs/LANGUAGE_SPEC.md). The smallest meaningful one loads a constant and halts:

{
  "version": "1.0",
  "registerCount": 1,
  "constants": [ { "int": "42" } ],
  "instructions": [
    ["LOAD_CONST", 0, 0],
    ["HALT", 0]
  ]
}

Documentation

Project layout

src/FinVM/          VM core: Interpreter, Eval, Process, Numeric, Encoding, FFI
src/Main.purs       CLI entry point
test/               PureScript spec suite + JS DB tests
bench/              benchmarks
dist/               bundled output (built artifact)

License

ISC.