hpcc-js-wasm  by hpcc-systems

WASM library collection for Node.js, browsers, and JS libraries

created 6 years ago
345 stars

Top 81.4% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This repository provides a collection of C++ libraries compiled to WebAssembly (WASM) for use in JavaScript environments, including Node.js and web browsers. It offers efficient implementations of utilities like Base91 encoding, DuckDB, Expat, Graphviz rendering, Llama.cpp, and Zstd compression, enabling developers to leverage powerful native code performance within web applications.

How It Works

The project utilizes the Emscripten SDK (emsdk) to compile C++ libraries into WASM modules. These modules are then packaged as npm libraries, allowing for easy integration into JavaScript projects. The WASM binaries are designed to be loaded asynchronously, providing a seamless way to access compiled code functionality without blocking the main thread. This approach allows complex computations and data processing to be offloaded to the browser or Node.js runtime.

Quick Start & Requirements

  • Install: npm install @hpcc-js/wasm (or individual packages like @hpcc-js/wasm-graphviz)
  • Prerequisites: Node.js, npm. Building from source requires a C++ compiler, CMake, and Emscripten SDK.
  • Usage: Import and load WASM modules asynchronously, as shown in the README's quick start examples.
  • Docs: Homepage

Highlighted Details

  • Includes bindings for Graphviz (dot to SVG rendering), Llama.cpp (LLM inference), and Zstd (compression).
  • Supports both browser and Node.js environments.
  • Monorepo structure with individual packages for each WASM module.
  • Provides migration guides from previous versions.

Maintenance & Community

The project is maintained by HPCC Systems. Further community engagement details are not explicitly provided in the README.

Licensing & Compatibility

The project appears to be licensed under the MIT License, allowing for commercial use and integration into closed-source projects.

Limitations & Caveats

The README mentions that more libraries are planned, indicating the current set may be incomplete. Building from source requires a complex setup involving the Emscripten SDK.

Health Check
Last commit

1 week ago

Responsiveness

1 day

Pull Requests (30d)
11
Issues (30d)
4
Star History
11 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.