rete-wasm
rete-wasm exposes the Rete RDF query engine to browsers through
wasm-bindgen. The default build is single-threaded, works from file://, and
can query either an in-memory .rete image or a remote range-readable file.
Build
In-memory graph
import init from "./pkg/rete_wasm.js";
await ;
const bytes = ;
const graph = ;
const result = JSON.;
Remote graph
RemoteGraph opens the header and lazily fetches only the ranges touched by a
query. The URL must support HTTP ranges and browser CORS without a redirect.
import init from "./pkg/rete_wasm.js";
await ;
const graph = ;
const result = JSON.;
The threads feature is experimental. It requires a nightly build-std WASM
build, wasm-bindgen-rayon, and a cross-origin-isolated COOP/COEP server. It is
not enabled in the default package or playground build. The asyncify feature
is also experimental and produces a separate artifact.
See the browser API guide, the hosting requirements, and docs.rs.
License
Apache-2.0. See LICENSE.