
Security News
PHP Foundation Says Chainguard Broke Security Embargo Ahead of Emergency Patches
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.
@ladybugdb/wasm-core
Advanced tools
Official WebAssembly build of Lbug in-process property graph database management system.
Ladybug-Wasm is the official WebAssembly build of Ladybug in-process property graph database management system. Ladybug is an embeddable property graph database management system built for query speed and scalability. Please visit Ladybug website for more information. Ladybug-Wasm enables the following:
npm i @ladybugdb/wasm-core
We provide a simple example to demonstrate how to use Ladybug-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 Ladybug-Wasm in a web browser with an in-memory filesystem.browser_persistent: This example demonstrates how to use Ladybug-Wasm in a web browser with a persistent IDBFS filesystem.nodejs: This example demonstrates how to use Ladybug-Wasm in Node.js.The example can be found in the examples directory.
In this package, three different variants of WebAssembly modules are provided:
multithreaded directory.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:
@ladybugdb/wasm-core, @ladybugdb/wasm-core/multithreaded, @ladybugdb/wasm-core/nodejs).sync directory of each variant (e.g., @ladybugdb/wasm-core/sync, @ladybugdb/wasm-core/multithreaded/sync, @ladybugdb/wasm-core/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.
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 lbug from "@ladybugdb/wasm-core";
lbug.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.
The API documentation can be found here:
Synchronous version: API documentation
Asynchronous version: API documentation
This section is relevant if you are interested in contributing to Ladybug'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.
npm i
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
npm test
FAQs
Official WebAssembly build of Lbug in-process property graph database management system.
The npm package @ladybugdb/wasm-core receives a total of 492 weekly downloads. As such, @ladybugdb/wasm-core popularity was classified as not popular.
We found that @ladybugdb/wasm-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.

Security News
PHP releases emergency patches for two critical RCE vulnerabilities as agencies urge organizations to take unpatched sites offline.

Threat Research
/Security News
A supply chain attack compromised LiteLLM 1.107.0 on PyPI and Docker, spreading malware that steals cloud credentials, developer secrets, and AI provider keys.