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

ryugraph-wasm

v25.9.2

Published

Official WebAssembly build of Ryugraph in-process property graph database management system.

Readme

Ryu-Wasm

Ryu-Wasm is the official WebAssembly build of Ryu in-process property graph database management system. Ryu is an embeddable property graph database management system built for query speed and scalability. Please visit Ryu website for more information. Ryu-Wasm enables the following:

  • Fast, in-browser graph analysis without ever sending data to a server
  • Strong data privacy guarantees, as the data never leaves the browser
  • Real-time interactive dashboards
  • Lightweight, portable solutions that leverage graphs within web applications

Installation

npm i ryu-wasm

Example usage

We provide a simple example to demonstrate how to use Ryu-Wasm. In this example, we will create a simple graph and run a few simple queries.

We provide three versions of this example:

  • browser_in_memory: This example demonstrates how to use Ryu-Wasm in a web browser with an in-memory filesystem.
  • browser_persistent: This example demonstrates how to use Ryu-Wasm in a web browser with a persistent IDBFS filesystem.
  • nodejs: This example demonstrates how to use Ryu-Wasm in Node.js.

The example can be found in the examples directory.

Understanding the package

In this package, three different variants of WebAssembly modules are provided:

  • Default: This is the default build of the WebAssembly module. It does not support multi-threading and uses Emscripten's default filesystem. This build has the smallest size and works in both Node.js and browser environments. It has the best compatibility and does not require cross-origin isolation. However, the performance maybe limited due to the lack of multithreading support. This build is located at the root level of the package.
  • Multi-threaded: This build supports multi-threading and uses Emscripten's default filesystem. This build has a larger size compared to the default build and only requires cross-origin isolation in the browser environment. This build is located in the multithreaded directory.
  • Node.js: This build is optimized for Node.js and uses Node.js's filesystem instead of Emscripten's default filesystem (NODEFS flag is enabled). This build also supports multi-threading. It is distributed as a CommonJS module rather than an ES module to maximize compatibility. This build is located in the nodejs directory. Note that this build only works in Node.js and does not work in the browser environment.

In each variant, there are two different versions of the WebAssembly module:

  • Async: This version of the module is the default version and each function call returns a Promise. This version dispatches all the function calls to the WebAssembly module to a Web Worker or Node.js worker thread to prevent blocking the main thread. However, this version may have a slight overhead due to the serialization and deserialization of the data required by the worker threads. This version is located at the root level of each variant (e.g., ryu-wasm, ryu-wasm/multithreaded, ryu-wasm/nodejs).
  • Sync: This version of the module is synchronous and does not require any callbacks (other than the module initialization). This version is good for scripting / CLI / prototyping purposes but is not recommended to be used in GUI applications or web servers because it may block the main thread and cause unexpected freezes. This alternative version is located in the sync directory of each variant (e.g., ryu-wasm/sync, ryu-wasm/multithreaded/sync, ryu-wasm/nodejs/sync).

Note that you cannot mix and match the variants and versions. For example, a Database object created with the default variant cannot be passed to a function in the multithreaded variant. Similarly, a Database object created with the async version cannot be passed to a function in the sync version.

Loading the Worker script (for async versions)

In each variant, the main module is bundled as one script file. However, the worker script is located in a separate file. The worker script is required to run the WebAssembly module in a Web Worker or Node.js worker thread. If you are using a build tool like Webpack, the worker script needs to be copied to the output directory. For example, in Webpack, you can use the copy-webpack-plugin to copy the worker script to the output directory.

By default, the worker script is resolved under the same directory / URL prefix as the main module. If you want to change the location of the worker script, you can use pass the optional worker path parameter to the setWorkerPath function. For example:

import ryu from "ryu-wasm";
ryu.setWorkerPath('path/to/worker.js');

Note that this function must be called before any other function calls to the WebAssembly module. After the initialization is started, the worker script path cannot be changed and not finding the worker script will cause an error.

For the Node.js variant, the worker script can be resolved automatically and you do not need to set the worker path.

API documentation

The API documentation can be found here:

Synchronous version: API documentation

Asynchronous version: API documentation

Local development

This section is relevant if you are interested in contributing to Ryu's Wasm API. Note that you need to have Emscripten installed on your machine to build the WebAssembly module. You can follow the instructions here to install Emscripten. You also need to have a C++ 20 compatible compiler installed on your machine to build the C++ code.

All the instructions below assume that you are in the tools/wasm directory.

Install dependencies

npm i

Build the WebAssembly module

npm run build

This will build the WebAssembly module in the release directory and create a tarball ready for publishing under the current directory. The tarball can be published to npm using the following command:

npm publish --access public

Run API tests

npm test