dag-ml-data WASM bindings
Browser-friendly bindings for dag-ml-data.
The default build exposes validation, planning, fingerprint and coordinator envelope helpers over UTF-8 JSON strings, with no host data buffers, provider vtables or file I/O.
The opt-in provider feature adds WasmInMemoryProvider, an eager in-WASM
provider over dag-ml-data-provider's InMemoryProvider (JSON in, JSON out;
handles cross as decimal strings because JS cannot represent the full u64
range). Build/test it with --features provider. An async JS buffer-fetcher
provider (host buffers fetched on demand via a Promise) is intentionally
deferred. With the feature on, contract_manifest_json() gains distinct
provider_surface / provider_exports / provider_capabilities sections.
contract_manifest_json() returns a stable JSON manifest with the package
version, supported contract ids, exported Python/WASM function names and shared
fixture digests. Browser integrations should check it before accepting cached
pipelines or persisted nirs4all-lite workspaces.
Build
node_out_dir="/target/wasm/dag-ml-data-wasm"
web_out_dir="/target/wasm-web/dag-ml-data-wasm"
JavaScript Surface
import init from "./pkg/dag_ml_data_wasm.js";
await ;
const manifest = JSON.;
const fingerprint = ;
const plan = JSON.;
Rust-side validation failures are returned as JSON strings with the ADR-11
descriptor fields category, code, severity, message,
remediation_hint and context.
validate_fold_set_json checks only the exhaustive partition shape of a
FoldSet: every sample must appear in validation exactly once. Use
validate_fold_set_against_sample_relations_json when the browser workflow also
needs group and augmentation-origin leakage checks.