HPCC-Systems Web-Assembly (JavaScript)
See the codeThis repository contains a collection of useful c++ libraries compiled to WASM for (re)use in Node JS, Web Browsers and JavaScript Libraries:
Built with:
This repository includes comprehensive instructions for AI assistants and GitHub Copilot:
packages/*/ directoriesThis repository is a monorepo with the following packages:
import { Base91 } from "@hpcc-js/wasm-base91";
import { Graphviz } from "@hpcc-js/wasm-graphviz";
import { Zstd } from "@hpcc-js/wasm-zstd";
// Graphviz ---
async function dot2svg() {
const graphviz = await Graphviz.load();
console.log("svg: ", graphviz.dot("digraph G { Hello -> World }"));
}
dot2svg();
// Base91 + Zstd ---
const text =
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi.";
const data = new TextEncoder().encode(text);
async function compressDecompress() {
const zstd = await Zstd.load();
const compressed_data = zstd.compress(data);
const base91 = await Base91.load();
const base91Str = base91.encode(compressed_data);
const compressed_data2 = base91.decode(base91Str);
const data2 = zstd.decompress(compressed_data2);
const text2 = new TextDecoder().decode(data2);
console.log("Text Length: ", text.length);
console.log("Compressed Length: ", compressed_data.length);
console.log("Base91 Length: ", base91Str.length);
console.log("Passed: ", text === text2);
}
compressDecompress();
v1.x.x
import { graphviz, wasmFolder } from "@hpcc-js/wasm";
wasmFolder("https://cdn.jsdelivr.net/npm/@hpcc-js/wasm/dist");
const dot = "digraph G { Hello -> World }";
graphviz.dot(dot).then((svg) => {
const div = document.getElementById("placeholder");
div.innerHTML = svg;
});
graphvizVersion.then((version) => console.log(version));
v2.x.x
import { Graphviz } from "@hpcc-js/wasm";
const dot = "digraph G { Hello -> World }";
Graphviz.load().then((graphviz) => {
const svg = graphviz.dot(dot);
const div = document.getElementById("placeholder");
div.innerHTML = svg;
console.log(graphviz.version());
});
Notes:
const instance = await <Wasm>.load();v3.x.x
import { Graphviz } from "@hpcc-js/wasm-graphviz";
const dot = "digraph G { Hello -> World }";
Graphviz.load().then((graphviz) => {
const svg = graphviz.dot(dot);
const div = document.getElementById("placeholder");
div.innerHTML = svg;
console.log(graphviz.version());
});
The following instructions are for building the entire repository from scratch. In general the instructions assume you are running from within a bash terminal.
To get an idea of what pre-requisites are required, please see the following files:
git clone https://github.com/hpcc-systems/hpcc-js-wasm.git
cd hpcc-js-wasm
npm ci
npm run build-docker
git clone https://github.com/hpcc-systems/hpcc-js-wasm.git
cd hpcc-js-wasm
npm ci
npm run install-build-deps
npm run build
19,156 followers · starred Mar 2021
394 followers · starred Nov 2025
254 followers · starred May 2023
126 followers · starred Oct 2022
TypeScript
44.0%
C++
37.6%
CMake
6.7%
JavaScript
4.4%
HTML
3.0%
C
2.5%
Vue
1.5%
HPCC-Systems Web-Assembly (JavaScript)
See the codeThis repository contains a collection of useful c++ libraries compiled to WASM for (re)use in Node JS, Web Browsers and JavaScript Libraries:
Built with:
This repository includes comprehensive instructions for AI assistants and GitHub Copilot:
packages/*/ directoriesThis repository is a monorepo with the following packages:
import { Base91 } from "@hpcc-js/wasm-base91";
import { Graphviz } from "@hpcc-js/wasm-graphviz";
import { Zstd } from "@hpcc-js/wasm-zstd";
// Graphviz ---
async function dot2svg() {
const graphviz = await Graphviz.load();
console.log("svg: ", graphviz.dot("digraph G { Hello -> World }"));
}
dot2svg();
// Base91 + Zstd ---
const text =
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi.";
const data = new TextEncoder().encode(text);
async function compressDecompress() {
const zstd = await Zstd.load();
const compressed_data = zstd.compress(data);
const base91 = await Base91.load();
const base91Str = base91.encode(compressed_data);
const compressed_data2 = base91.decode(base91Str);
const data2 = zstd.decompress(compressed_data2);
const text2 = new TextDecoder().decode(data2);
console.log("Text Length: ", text.length);
console.log("Compressed Length: ", compressed_data.length);
console.log("Base91 Length: ", base91Str.length);
console.log("Passed: ", text === text2);
}
compressDecompress();
v1.x.x
import { graphviz, wasmFolder } from "@hpcc-js/wasm";
wasmFolder("https://cdn.jsdelivr.net/npm/@hpcc-js/wasm/dist");
const dot = "digraph G { Hello -> World }";
graphviz.dot(dot).then((svg) => {
const div = document.getElementById("placeholder");
div.innerHTML = svg;
});
graphvizVersion.then((version) => console.log(version));
v2.x.x
import { Graphviz } from "@hpcc-js/wasm";
const dot = "digraph G { Hello -> World }";
Graphviz.load().then((graphviz) => {
const svg = graphviz.dot(dot);
const div = document.getElementById("placeholder");
div.innerHTML = svg;
console.log(graphviz.version());
});
Notes:
const instance = await <Wasm>.load();v3.x.x
import { Graphviz } from "@hpcc-js/wasm-graphviz";
const dot = "digraph G { Hello -> World }";
Graphviz.load().then((graphviz) => {
const svg = graphviz.dot(dot);
const div = document.getElementById("placeholder");
div.innerHTML = svg;
console.log(graphviz.version());
});
The following instructions are for building the entire repository from scratch. In general the instructions assume you are running from within a bash terminal.
To get an idea of what pre-requisites are required, please see the following files:
git clone https://github.com/hpcc-systems/hpcc-js-wasm.git
cd hpcc-js-wasm
npm ci
npm run build-docker
git clone https://github.com/hpcc-systems/hpcc-js-wasm.git
cd hpcc-js-wasm
npm ci
npm run install-build-deps
npm run build
19,156 followers · starred Mar 2021
394 followers · starred Nov 2025
254 followers · starred May 2023
126 followers · starred Oct 2022
TypeScript
44.0%
C++
37.6%
CMake
6.7%
JavaScript
4.4%
HTML
3.0%
C
2.5%
Vue
1.5%