mif-rs

July 6, 2026 · View on GitHub

mif-rs, a Rust implementation of MIF. The chevron-M mark and wordmark on a dark
            field, the promise Validate. Resolve. Embed. Search., and its four core crates —
            mif-schema, mif-ontology, mif-embed, mif-store — as machine-cyan and human-amber
            chips.

CI Rust Version License Clippy cargo-deny Security: gitleaks Dependabot

Rust implementation of the MIF (Modeled Information Format) specification.

Crates

CrateKindPurpose
mif-corelibraryShared types: OntologyReference, EntityReference, EntityData, ConceptType
mif-schemalibraryJSON Schema validation of MIF documents, citations, and ontology definitions
mif-ontologylibraryThree-tier ontology extends chain resolution
mif-problemlibraryRFC 9457 Problem Details error envelopes
mif-frontmatterlibraryMarkdown frontmatter <-> JSON-LD lossless round-trip
mif-embedlibraryLocal sentence-embedding inference
mif-storelibrarySQLite vector store for document embeddings
mif-clibinaryCommand-line interface (validate, ontology resolve, ingest, search, find-similar, corpus-stats)
mif-mcpbinaryMCP server exposing the same six operations as tools

Installation

cargo add mif-core mif-schema mif-ontology mif-problem mif-frontmatter mif-embed mif-store   # libraries
cargo install mif-cli mif-mcp                 # binaries

Quick start

mif-cli validate document.json
mif-cli ontology resolve grazing-plan --ontologies-dir ./ontologies
mif-cli ingest document.md --db-path .mif/vectors.db
let document: serde_json::Value = serde_json::from_str(&contents)?;
mif_schema::validate_document(&document)?;

Development

just is the local task runner. Run just to list all recipes. Run lefthook install once after cloning to set up local git hooks mirroring CI (fmt/clippy/test on commit/push).

just check            # Full CI check (fmt + clippy + test + doc + deny)
just build            # Debug build (workspace)
just test             # All tests
Raw cargo equivalents
cargo build --workspace
cargo test --workspace --all-features
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo fmt --all -- --check
cargo doc --workspace --no-deps --all-features
cargo deny check

CI/CD and releases

CI (pipeline.yml, quality-gates.yml) runs formatting, lint, tests, docs, supply-chain checks, and the org's SAST/SCA/Scorecard/Trivy gates on every push and PR. Releases are tag-triggered (release.yml, publish.yml, package-homebrew.yml) and produce SLSA-attested, multi-platform binaries for both mif-cli and mif-mcp, plus crates.io publication via Trusted Publishing. See docs/runbooks/RELEASING.md for the full procedure and SECURITY.md for artifact verification commands.

See CLAUDE.md for full development conventions (lint configuration, error handling, testing).

Contributing

See CONTRIBUTING.md for development setup and coding standards. Please also review CODE_OF_CONDUCT.md, SECURITY.md, and GOVERNANCE.md.

MSRV policy

The Minimum Supported Rust Version (MSRV) is 1.95. Raising the MSRV is a minor breaking change.

License

MIT — see LICENSE.