inference-engine 0.1.0-alpha.2

Native Rust inference foundation with checked RDF rule-profile compilation
Documentation

inference-engine

crates.io PyPI npm CI License

Native Rust inference foundation for RDF and Datalog, with Python and Node.js bindings.

Alpha scope

The first alpha compiles named rdf-reasoning profiles into checked portable Datalog programs and reports their explicit exclusions. Rust, Python and Node.js use the same Rust implementation and published semantic dependencies.

Rust also provides bounded forward execution of the explicit rdfs-subclass profile: subclass transitivity (rdfs11) and inherited membership (rdfs9). The executor evaluates the definitions from rdf-reasoning; callers supply asynchronous database scans, indexed membership probes and scratch storage. See the storage adapter contract.

The other named profiles are compile-only. Full RDFS/OWL-RL, arbitrary Datalog execution and SHACL inference are not implemented. Python and Node currently expose profile inspection; executable storage adapters use the Rust API.

let profile = inference_engine::compile_profile("rdfs-core")?;
assert_eq!(profile.program.rules.len(), 14);
# Ok::<(), Box<dyn std::error::Error>>(())
from inference_engine import compile_profile
profile = compile_profile("rdfs-core")
print(profile["exclusions"])
const {compileProfile} = require('inference-engine');
console.log(compileProfile('rdfs-core').exclusions);

Unsupported selectors fail; full owl2-rl is not an alias for a restricted profile. Python requires 3.11+; Node.js requires 22+. Native artifacts target Linux glibc x64/arm64, macOS x64/arm64, and Windows x64. No Python or JavaScript evaluator is used when the native module is missing.

Development and releases

Rust is pinned in rust-toolchain.toml; formatting has an independent nightly pin. cargo test --locked runs public API tests. Commit hooks run formatting and Clippy. python3 scripts/test-release.py checks the release contract.

Cargo is the version authority: 0.1.0-alpha.1 maps to Python 0.1.0a1 and npm 0.1.0-alpha.1. All three publish from one tested revision. npm uses the alpha dist-tag; GitHub releases remain prereleases. Stable promotion is a deliberate future change. See publication setup.

License

Licensed under either the Apache License, Version 2.0 (LICENSE-APACHE) or the MIT license (LICENSE-MIT), at your option.