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

volt-core-node

v1.1.1

Published

Volt-core Node.js native bindings (napi) - 12x faster JavaScript

Downloads

198

Readme

@volt-core/node

High-performance Node.js bindings for volt-core — 12x faster parallel computation across all CPU cores.

npm install @volt-core/node

Quick Start

const Volt = require('@volt-core/node');

// Initialize thread pool (one per app)
Volt.initPool(require('os').cpus().length);

// Run async computation
const result = await Volt.compute({
  operation: 'gaussian_blur',
  data: imagePixels,
  params: { width: 1000, height: 1000 }
});

console.log(`Filtered in ${result.execution_time_ms}ms using ${result.cores_used} cores`);

API

initPool(cores?: number)

Initialize thread pool. Call once at app startup.

Volt.initPool(8); // Use 8 cores (defaults to CPU count)

info(): Promise<Object>

Get engine info.

const info = await Volt.info();
// { version: "0.1.0", cores_available: 8, supports_crypto: true }

compute(task): Promise<ComputeResult>

Run single computation task.

const result = await Volt.compute({
  operation: 'sort_parallel',
  data: [5, 2, 8, 1, 9],
  params: { /* operation-specific */ }
});

computeBatch(tasks): Promise<ComputeResult[]>

Run multiple tasks in parallel.

const results = await Volt.computeBatch([
  { operation: 'sort_parallel', data: array1 },
  { operation: 'sort_parallel', data: array2 },
  { operation: 'sort_parallel', data: array3 }
]);

Supported Operations

  • gaussian_blur — Image processing with kernel
  • edge_detect — Edge detection filter
  • sort_parallel — Parallel merge sort
  • reduce_sum — Sum reduction
  • matrix_multiply — Matrix multiplication
  • particle_animate — Physics simulation

Building

# Build native addon from workspace root
npm run build-native --prefix packages/node

# Or manually:
cargo build -p volt-core-node --release --manifest-path crates/volt-core-node/Cargo.toml
node packages/node/scripts/copy-native.js

Testing

# Run benchmark
npm run test --prefix packages/node

# Output: iterations, timing, ops/sec
# iterations=1000 time_ms=25 ops_s=40000.00

Troubleshooting

"Native addon not found"

  • Run npm run build-native --prefix packages/node
  • Ensure target/release/volt_core_node.dll (Windows) or .so (Linux) or .dylib (macOS) exists

"init_pool is not a function"

  • Ensure copy script ran: node packages/node/scripts/copy-native.js
  • Check packages/node/build/Release/volt_core_node.node exists

Performance

  • Typical: 40K–188K ops/sec (depends on operation, input size, CPU cores)
  • Overhead: <5ms per call (includes JSON serialization)
  • Memory: Minimal; data passed by reference where possible

Type Definitions

interface ComputeTask {
  operation: string;
  data: number[] | string;
  params?: {
    width?: number;
    height?: number;
    scale?: number;
    kernel_size?: number;
    iterations?: number;
  };
}

interface ComputeResult {
  result: number[] | string | object;
  cores_used: number;
  execution_time_ms: number;
}

Full types in index.d.ts.

License

MIT