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

rpgmard-wasm

v5.0.1

Published

WASM bindings for rpgmad-lib.

Readme

rpgmard-wasm

WebAssembly bindings for rpgmad-lib, generated via wasm-bindgen. A thin wrapper around the Rust reference implementation - useful when you want behavior guaranteed identical to the Rust crate without a second, hand-maintained implementation.

Install

npm install rpgmard-wasm

API

Two functions (see src/lib.rs for full doc comments):

function decryptArchive(archiveData: Uint8Array): ArchiveEntry[];
function encryptArchive(entries: ArchiveEntry[], engine: Engine): Uint8Array;

plus the ArchiveEntry class (path/data, both Uint8Array) and the Engine enum (Older = 1, VXAce = 3) - Older covers RPG Maker XP/VX's .rgssad/.rgss2a, VXAce covers VX Ace's .rgss3a.

The reference Decrypter::decrypt returns an iterator borrowing its input buffer - that can't cross the JS/WASM call boundary (a call only lives for the duration of the call), so these two functions copy data in and out instead: decryptArchive takes ownership of the input and returns independent, owned entries; encryptArchive returns a freshly-allocated archive buffer.

Usage

import init, { decryptArchive, Engine } from "rpgmard-wasm";

await init(); // instantiates the wasm module - do this once, before first use

const archiveData = new Uint8Array(await Deno.readFile("Game.rgss3a"));

for (const entry of decryptArchive(archiveData)) {
    console.log(new TextDecoder().decode(entry.path));
}

encryptArchive goes the other way, packing entries back into an archive for a given engine:

import init, { encryptArchive, ArchiveEntry, Engine } from "rpgmard-wasm";

await init();

const entries = [new ArchiveEntry(new TextEncoder().encode("Data/Scripts.rvdata2"), scriptBytes)];
const archiveData = encryptArchive(entries, Engine.VXAce);

Under Node/Bun, init()'s default fetch()-based loading doesn't apply - pass the .wasm bytes explicitly instead:

import { readFile } from "node:fs/promises";
import init, { decryptArchive } from "rpgmard-wasm";

await init(
  await readFile(new URL("./rpgmard_wasm_bg.wasm", import.meta.resolve("rpgmard-wasm"))),
);

Building

wasm-pack build --release --target web

Requires the wasm32-unknown-unknown rustup target (rustup target add wasm32-unknown-unknown) and wasm-pack (cargo binstall wasm-pack). Output goes to pkg/ (gitignored): the compiled .wasm, a JS glue module, a .d.ts, and the package.json this crate publishes to npm from.