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

beve-wasm

v1.0.1

Published

WebAssembly bindings for BEVE (Binary Efficient Versatile Encoding) - Go and Rust implementations

Downloads

100

Readme

beve-wasm

WebAssembly bindings for BEVE - Binary Efficient Versatile Encoding

High-performance WASM implementations of the BEVE binary format in Go and Rust.

📦 Installation

npm install beve-wasm
# or
yarn add beve-wasm
# or
bun add beve-wasm

🚀 Usage

Auto-detection (Recommended)

Automatically uses the best available implementation:

import { encode, decode } from 'beve-wasm';

const data = { id: 123, name: "Alice", scores: [95, 87, 92] };
const bytes = await encode(data);
const decoded = await decode(bytes);

Go WASM

import { encode, decode, init } from 'beve-wasm/go';

// Initialize Go WASM runtime
await init();

const data = { message: "Hello, BEVE!" };
const bytes = await encode(data);
const decoded = await decode(bytes);

Rust WASM

import init, { marshal, unmarshal } from 'beve-wasm/rust';

// Initialize Rust WASM module
await init();

const data = { count: 42, items: ["a", "b", "c"] };
const bytes = marshal(JSON.stringify(data));
const decoded = JSON.parse(unmarshal(bytes));

🎯 Performance

| Implementation | Size | Encode (ops/sec) | Decode (ops/sec) | |---------------|------|------------------|------------------| | Rust WASM | 91 KB | ~140K | ~180K | | Go WASM | 279 KB | ~50K | ~80K |

Benchmarks run on Node.js v20, Apple M1

📊 Implementation Details

Rust WASM (rust/)

  • Size: 91 KB (wasm-pack optimized)
  • Build: wasm-pack build --target web
  • Best for: Browser environments, edge runtimes
  • Features: Zero-copy, SIMD optimizations

Go WASM (go/)

  • Size: 279 KB (TinyGo compiled)
  • Build: tinygo build -o beve.wasm -target wasm
  • Best for: Node.js, server-side
  • Features: Full Go runtime, mature implementation

🔧 Advanced Usage

Direct WASM File Access

// For custom WASM loaders or bundlers
import wasmUrl from 'beve-wasm/rust/beve_bg.wasm?url';
import { initSync } from 'beve-wasm/rust';

const response = await fetch(wasmUrl);
const buffer = await response.arrayBuffer();
initSync(buffer);

Browser Usage

<script type="module">
  import init, { marshal, unmarshal } from 'https://unpkg.com/beve-wasm/rust/beve.js';
  
  await init();
  const data = { test: 123 };
  const binary = marshal(JSON.stringify(data));
  console.log('Encoded:', binary);
</script>

📁 Package Structure

beve-wasm/
├── index.js          # Auto-detection entry point
├── index.d.ts        # TypeScript definitions
├── go/               # Go WASM implementation
│   ├── beve.wasm     # Go WASM binary (279 KB)
│   ├── wasm_exec.js  # Go WASM runtime (16 KB)
│   └── index.js      # Go wrapper
└── rust/             # Rust WASM implementation
    ├── beve_bg.wasm  # Rust WASM binary (91 KB)
    ├── beve.js       # Rust JS glue (7 KB)
    └── beve.d.ts     # TypeScript types

🌐 Platform Support

  • ✅ Node.js 16+
  • ✅ Modern browsers (Chrome, Firefox, Safari, Edge)
  • ✅ Deno
  • ✅ Bun
  • ✅ Edge runtimes (Cloudflare Workers, Vercel Edge)

🔗 Related Packages

  • beve - Pure TypeScript implementation (no WASM)
  • beve-go - Go implementation
  • beve-rs - Rust implementation

📖 Documentation

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md.

📄 License

MIT © Burak Şentürk


Built with ❤️ by the BEVE community