Bindings overview¶
Honest matrix for published vs source-build language bindings. Install channels: Install and channels. API parity: each binding mirrors the Python surface via ontologos-js.
Quick decision¶
| I want to… | Install today | Registry |
|---|---|---|
| Embed in Rust | ontologos-* = "1.1.4" on crates.io |
Published |
| Use from Python | pip install ontologos |
Published (PyPI) |
| Use from Node.js | npm install ontologos |
Published (npm) |
| Use from Java | Build crates/ontologos-java |
Source-build (Maven local) |
| Use from .NET | Build crates/ontologos-dotnet |
Source-build |
| Use from C/C++ | Build crates/ontologos-c |
Source-build |
| Use in browser (WASM) | npm install @ontologos/wasm · Wasmer |
Published (npm + Wasmer) |
v1.1.4 ships shared FFI and native bindings. Node (ontologos) and WASM (@ontologos/wasm) are on npm; WASM .wasm is also on Wasmer. Java/.NET/C remain source-build. See Release status.
API parity¶
All bindings expose the same core types:
| Type | Python | Node | Java | .NET | C/C++ | WASM |
|---|---|---|---|---|---|---|
OntologyBuilder |
Yes | Yes | Yes | Yes | Yes | Yes |
Ontology |
Yes | Yes | Yes | Yes | Yes | Yes |
Reasoner |
Yes | Yes | Yes | Yes | Yes | Yes |
classify() |
Yes | Yes | Yes | Yes | Yes | Yes |
explain() |
Yes | Yes | Yes | Yes | Partial | Yes |
| Incremental edits | Yes | Yes | Yes | Yes | Yes | Yes |
| File load | Yes | Yes | Yes | Yes | Yes | No (bytes/JSON only) |
Reference pages: Python · Node · Java · .NET · C/C++ · WASM
Tutorial guides: Python · Node · Java · .NET · C/C++ · WASM
End-to-end quick start (Node.js)¶
From a clone with family.owl in the working directory:
git clone https://github.com/eddiethedean/ontologos.git
cd ontologos/crates/ontologos-node
curl -L -o family.owl \
https://raw.githubusercontent.com/eddiethedean/ontologos/main/benchmarks/data/family.owl
npm install && npm run build
node -e "const {Reasoner}=require('ontologos'); console.log(Reasoner.fromPath('family.owl','rl').classify())"
End-to-end quick start (Java)¶
git clone https://github.com/eddiethedean/ontologos.git
cd ontologos
cargo build -p ontologos-jni --release
curl -L -o family.owl \
https://raw.githubusercontent.com/eddiethedean/ontologos/main/benchmarks/data/family.owl
cd crates/ontologos-java/java
mvn test -Dtest=SmokeTest
See Java guide for Reasoner.fromPath("family.owl", "rl").
Production profiles¶
On v1.1.4 (PyPI / crates.io): rdfs, rl, el, auto, dl, swrl are production-supported. Preview: alc, dl-preview.
Full matrix: Profile stability.
Build troubleshooting¶
| Symptom | Fix |
|---|---|
Java: UnsatisfiedLinkError |
Set java.library.path to target/release or -Dontologos.native.path=… — see Java guide |
| Node: native addon rebuild after Rust change | npm run build in crates/ontologos-node |
WASM: bundler cannot load .wasm |
Follow wasm-bindgen integration for your bundler — see WASM guide |
.NET: DllNotFoundException |
Build ontologos-dotnet release cdylib first — see .NET guide |
C/C++: linker cannot find libontologos_c |
cargo build -p ontologos-c --release — see C/C++ guide |
Full list: Troubleshooting — bindings.