Oxiland
Oxiland is a safe Rust facade for Redland-shaped RDF workflows—models,
contexts, statement matching, SPARQL query/update/results, and stream-oriented
Turtle / N-Triples / N-Quads / TriG / RDF/XML I/O—backed by pinned
Oxigraph 0.5.9 with #![forbid(unsafe_code)].
Use it when you want Redland concepts and explicit unsupported/error behavior
without C ownership; use Oxigraph directly when you only need the engine API.
Version 0.4.0 covers the trusted core model, Redland-shaped RDF I/O,
SPARQL query/update/results, and durable Fjall storage (format v1) with
transactions, with scoped evidence in the parity ledger—not
C ABI/source compatibility or full librdf accounting.
[!IMPORTANT] Compatibility claims are evidence-scoped. See the parity ledger and 0.4 report. Do not read “Redland-shaped” as drop-in C or ABI compatibility.
When to use Oxiland
| Choose Oxiland when… | Prefer Oxigraph directly when… |
|---|---|
| You want Redland-like models, contexts, and I/O facades | You only need Oxigraph’s store/SPARQL/I/O API |
You need explicit Unsupported / typed errors for missing features |
You want every Oxigraph capability without a facade |
| You are migrating Redland concepts into safe Rust | You are starting a greenfield Oxigraph app |
| You care about inventory-backed compatibility evidence | You do not need Redland workflow mapping |
A longer comparison (including Sophia and native Redland) is in docs/evaluators/positioning.md.
Current capabilities
| Capability | Status |
|---|---|
| RDF named nodes, blank nodes, literals, triples, and quads | Available through Oxigraph types |
| In-memory model | Available |
| Default-graph CRUD | Available |
| Named-graph/context CRUD and matching | Available |
| Partial statement matching | Available; streaming StatementMatches |
| SPARQL ASK / SELECT / CONSTRUCT / DESCRIBE | Available; streaming QueryResults |
| RDF parser and serializer facades | Available; Turtle, N-Triples, N-Quads, TriG, RDF/XML |
| Syntax discovery by name, MIME type, and extension | Available via Syntax |
| Persistent Fjall model | Available; format v1 via Model::open / open_with (ADR-006) |
| Transactions / sync / clear | Available; Model::transaction, sync, clear |
| SPARQL Update and results serialization | Available; XML/JSON/CSV/TSV + graph serialize helper |
| Python package (Pythonic PyPI API) | Planned for 0.7 |
| Full safe Rust Redland accounting | Planned for 0.6 |
| C source and ABI compatibility | Planned for 0.8–0.9 |
“Available” means the current public workflow is implemented and tested. It does not imply full subsystem parity with Redland.
Advertised RDF syntaxes
| Syntax | Name | Media type | Extension | Datasets |
|---|---|---|---|---|
| Turtle | turtle |
text/turtle |
.ttl |
no |
| N-Triples | ntriples |
application/n-triples |
.nt |
no |
| N-Quads | nquads |
application/n-quads |
.nq |
yes |
| TriG | trig |
application/trig |
.trig |
yes |
| RDF/XML | rdfxml |
application/rdf+xml |
.rdf |
no |
Ambiguous aliases (text/plain, application/xml, .txt, .xml) and N3 /
JSON-LD return Error::Unsupported. Full
dispositions: compatibility/baseline/format-matrix.json.
Requirements
- Rust 1.87 or newer (edition 2024; matches the Oxigraph 0.5.9 pin used for compatibility testing)
Install or update with rustup:
rustup update stable
rustc --version # >= 1.87
Installation
[]
= "0.4.0"
Quick start
use ;
use ;
Model::add returns true when it inserts a new statement and false when the
same statement already exists.
cargo run --example quick_start
More workflows: Getting started.
Contexts and pattern matching
Redland contexts map to Oxigraph graph names:
use ;
use ;
Model::find returns a streaming StatementMatches iterator over a store
snapshot (ADR-005). Run cargo run --example contexts.
Parsing and serialization
use ;
use Model;
Parser::load_into inserts progressively and may leave partial data on parse
failure (ADR-007). Prefer load_collecting when you need parse-then-insert
batching without transactions. See I/O guide and
cargo run --example progressive_load.
Persistent storage
Model::open stores quads in a Fjall
keyspace and keeps an Oxigraph in-memory working set for querying:
use Model;
Supported (format v1): on-disk compatibility is promised for Oxiland 0.4.x
patch releases (ADR-006). Pre-0.4 experimental directories need
Model::migrate_legacy_store. Prefer N-Quads export for archival copies across
majors. Details: persistence guide.
Documentation
Published guides: oxiland.readthedocs.io. API reference: docs.rs/oxiland.
| Audience | Start here |
|---|---|
| Users | Getting started · docs hub |
| Evaluators | Positioning · Parity ledger |
| Contributors | CONTRIBUTING.md · Planning docs |
Also: Changelog · FAQ · Security policy · Code of conduct
Architecture (summary)
Rust application
│
▼
Oxiland safe facade ──> Oxigraph RDF, storage, I/O, and SPARQL
▲
│
Future oxiland (PyPI, 0.7+) and oxiland-capi (0.8+)
Roadmap highlights: 0.4 durable storage contracts, 0.7 Python package, 0.8 C ABI preview. Full plan: docs/ROADMAP.md.
Development
cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo test
cargo doc --no-deps
python3 scripts/check-inventory.py
python3 scripts/check-docs.py
scripts/generate-public-api.sh check
License
Licensed under either of Apache-2.0 or MIT at your option.