Expand description
§phop-wasm — WebAssembly bindings for phop
Exposes the phop-core discovery engine to JavaScript via
wasm-bindgen. The single entry point discover_json takes JSON-encoded data
and configuration, runs discovery, and returns a JSON-encoded Pareto front, making
it trivial to call from a browser without any custom marshalling.
ⓘ
import init, { discover_json, set_panic_hook } from "./pkg/phop_wasm.js";
await init();
set_panic_hook();
const data = JSON.stringify({ x: [[1],[2],[3]], y: [2,4,6] });
const cfg = JSON.stringify({ population: 64, max_epochs: 50, seed: 0 });
const out = JSON.parse(discover_json(data, cfg));
console.log(out.solutions);Functions§
- capabilities
- Report which verification tiers this wasm build supports — lets the UI light up only what is
actually available (e.g. hide the SMT panel when built without
smt). - discover_
and_ verify - Run the full discover→verify pipeline from JSON, entirely in-browser.
- discover_
json - Run symbolic discovery from JSON.
- set_
panic_ hook - Install
console_error_panic_hookso Rust panics surface as readableconsole.errormessages in the browser.