0.0.2 • Published 4 years ago

node-clingo-wasm v0.0.2

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
4 years ago

Clingo WebAssembly

npm version CDN clingo version Lua version Build Status

Clingo compiled to WebAssembly with Emscripten.

This is work in progress!

This repo combines work from two previous repos: https://github.com/Aluriak/webclingo-example and https://github.com/domoritz/wasm-clingo.

Installation

Using NPM or Yarn

npm install clingo-wasm or yarn add clingo-wasm.

The library is packaged differently for web vs NodeJS environments, so import accordingly.

// From the web
import Clingo from "clingo-wasm/web";
// From NodeJS
import Clingo from "clingo-wasm/node";

Without NPM

Load Clingo from the JSDelivr CDN.

<script src="https://cdn.jsdelivr.net/npm/clingo-wasm@VERSION"></script>

Usage

TODO

Developers

Build WASM file

Run yarn build if you have docker. For testing purposes, you can run scripts/build_clingo.sh from the root directory of the project.

Update Lua or Clingo

Update the versions in scripts/versions.sh and in the badges in this README.md. Then push to a new branch and let Travis build the new WASM file.