@hpcc-js/wasm
v2.36.0
Published
hpcc-js - WASM Libraries
Maintainers
Readme
@hpcc-js/wasm
This folder contains a rebundling the following WebAssembly libraries for backward compatability with v2.x.x:
- @hpcc-js/wasm-base91
- @hpcc-js/wasm-duckdb
- @hpcc-js/wasm-expat
- @hpcc-js/wasm-graphviz
- @hpcc-js/wasm-graphviz-cli
- @hpcc-js/wasm-zstd
Resource management
The re-exported loaders support dispose() and TypeScript using declarations (TypeScript 5.2+ with "ESNext.Disposable" in lib). Leaving the scope is equivalent to calling X.unload():
import { Graphviz } from "@hpcc-js/wasm";
{
using graphviz = await Graphviz.load();
console.log(graphviz.dot("digraph G { Hello -> World }"));
} // Graphviz.unload() runs hereEach load() returns a shared singleton, so disposing it unloads the module for every caller in the current JavaScript context. Disposing an instance that has already been unloaded does nothing.
