- Notifications
You must be signed in to change notification settings - Fork1
Compile microsat to WebAssembly using emscripten
License
glnc/microsat-wasm
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Compile microsat to WebAssembly using emscripten.
This is a fork ofmicrosat 2020-05-14 by Christian Bettinger and Anna Schmitt, originally created by Armin Biere and Marijn Heule.
Tested on Ubuntu 16.04 LTS.
Follow the instructions onhttps://kripken.github.io/emscripten-site/docs/getting_started/downloads.html in order to install emscripten and all of its dependencies.
- make
Runbuild.sh
to compile microsat using emscripten as well as to build the JavaScript modules (seeUsage).
Runbuild.sh demo
to additionally build and run a demo web app listening onhttp://localhost:8080.
emscripten generates the CommonJS modulerelease/microsat.js
. Additionally there is a wrapper modulerelease/Wrapper.js
that is recommended to use, since it does some optimization regarding memory consumption.
constmicrosat=require("./Wrapper.js");microsat.setModule(require("./microsat.js"));microsat.setWASM("./microsat.wasm");microsat.run("p cnf 5 3 [...]",["--propagate"]).then(result=>{console.log(result);}).catch(reason=>{console.error(reason);});
Copyright © 2018 Christian Bettinger and Anna Schmitt
Copyright © 2018 Armin Biere
Copyright © 2014-2018 Marijn Heule
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.