Crate oxirs_wasm

Crate oxirs_wasm 

Source
Expand description

§OxiRS WASM

WebAssembly bindings for OxiRS - Run RDF/SPARQL in the browser.

§Features

  • RDF Parsing: Turtle, N-Triples, JSON-LD
  • In-Memory Store: HashMap-based triple store
  • SPARQL Queries: SELECT, ASK, CONSTRUCT
  • Validation: Basic SHACL validation

§Example (JavaScript)

import init, { OxiRSStore } from 'oxirs-wasm';

await init();

const store = new OxiRSStore();
await store.loadTurtle(`
    @prefix : <http://example.org/> .
    :alice :knows :bob .
    :bob :name "Bob" .
`);

const results = store.query('SELECT ?name WHERE { ?person :name ?name }');
console.log(results);

Structs§

OxiRSStore
OxiRS in-memory RDF store
QueryResult
Query result for JavaScript
Triple
RDF Triple representation for JavaScript

Enums§

WasmError
WASM error type

Functions§

init
log
Log a message to the browser console
version
Get OxiRS WASM version