oxilite-dylib 0.3.0

oxilite backend loading a user-supplied libsqlite3 shared library at runtime
Documentation

oxilite-dylib

crates.io docs.rs license

An oxilite backend that loads a SQLite shared library from a path at runtime. No SQLite is linked at build time: use the system libsqlite3, a vendor-provided build, or SQLCipher.

Website · API docs · Guide and architecture · Changelog and issues

Only the stable SQLite C API is resolved (open_v2, prepare_v2, step, column_*, finalize, errmsg, changes, exec, and optionally create_function_v2), so any SQLite ≥ 3.37 works. When the library allows user-defined functions, oxilite registers its own; otherwise it compiles to plain SQL (Shallow SQL), as on D1.

Usage

Through oxilite (feature dylib):

let store = oxilite::store::Store::open_with_library("/usr/lib/x86_64-linux-gnu/libsqlite3.so.0", "data.sqlite")?;

Or directly:

use oxilite::store::Store;
use oxilite_dylib::{find_system_library, DylibBackend};

let library = find_system_library().expect("no system libsqlite3");
let store = Store::with_backend(DylibBackend::open(library, "data.sqlite")?)?;

SqliteLibrary::load(path) loads a library once and reports its version_number(). The same database file can be opened with the bundled SQLite (oxilite-rusqlite) and with a runtime library, for example by oxilite serve --library.

The oxilite family

oxilite is an Oxigraph-compatible RDF database and SPARQL 1.1 engine that stores its data in SQLite, so it runs anywhere SQLite runs: in-process, on a system or vendor libsqlite3, on Cloudflare D1 and in Durable Objects. The same data can be queried with SPARQL and openCypher, reasoned over with RDFS / OWL, and validated with SHACL and ShEx. Read the overview on oxilitedb.com and the full guide in the main README.

Package What it is for
oxilite The store: a drop-in for oxigraph::store::Store, plus AsyncStore for D1
oxilite-core The sans-IO core: term encoding, schema, SPARQL → SQL compiler and planner
oxilite-rusqlite In-process backend with a bundled SQLite (the default)
oxilite-dylib Backend that loads your own libsqlite3 at runtime
oxilite-d1 Cloudflare D1 backend for Rust Workers
oxilite-cypher openCypher over the same data, OWL- and SHACL-aware
oxilite-jsonld JSON-LD documents stored verbatim, one named graph each
oxilite-vc Verifiable Credentials: stored under their id, indexed, queryable
oxilite-reason OWL 2 RL materialization with reasonable
oxilite-validate SHACL and ShEx validation with rudof
oxilite-cli The oxilite command and a SPARQL endpoint like oxigraph serve
@oxilite/node Node.js bindings, API of Oxigraph's JS package
@oxilite/d1 Cloudflare D1 and Durable Objects from TypeScript (WebAssembly core)
@oxilite/common RDF/JS terms and shared TypeScript types

License

Dual-licensed under MIT or Apache-2.0, at your option, like Oxigraph.