knolo-core-rust 5.5.0

Rust runtime support for verifiable V5 Knowledge Images and compatible .knolo packs
Documentation
  • Coverage
  • 0.4%
    1 out of 250 items documented0 out of 64 items with examples
  • Size
  • Source code size: 139.1 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.49 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • HiveForensics-AI/knolo-core
    56 14 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • HiveForensicsAI

knolo-core-rust

Compatibility status: legacy v1–v3 Rust reader/query profile plus the V5 read-only Knowledge Image verifier, deterministic migration foundation, and VQF-1 required object/event readers. The TypeScript runtime remains the V4 retrieval reference and canonical VQF encoder; this crate is a read-only V5 byte-contract implementation.

The shared implementation roadmap is ../../docs/ROADMAP.md.

Native Rust runtime support for Knolo .knolo packs.

V5 Knowledge Image foundation

The crate also exposes a dependency-free, read-only V5 verifier:

use knolo_core_rust::{inspect_knowledge_image, migrate_v4_to_v5};

let migration = migrate_v4_to_v5(&v4_bytes)?;
let verification = inspect_knowledge_image(&migration.image)?;
assert_eq!(verification.state_root, migration.state_root);

V5 uses deterministic CBOR, SHA-256 domain-separated roots, A/B superblocks, immutable object/event/commit segments, and fail-closed validation. The V4 reader and lexical query API remain compatible and unchanged. The crate also implements bounded V5 EQL v1 with deterministic plan_root and result_root values matching the TypeScript runtime.

Policy evaluation is also policy-root-bound and produces matching authorization roots. The crate exposes canonical authority-envelope roots and injected verifier callbacks; cryptographic algorithms and external identity resolution remain host responsibilities. Optional key IDs are included in canonical envelope payloads for rotation parity.

Required VQF-1 object and event segments are decoded with the same logical payload, identity, segment-root, and state-root checks as TypeScript. Native VQF encoding, lexical postings, and the optional query-index codec remain outside the portable Rust writer contract.

Native inspection consumers can use inspect_knowledge_runtime_v5 and inspect_knowledge_studio_management_v5 for the verified base diagnostics and KIP-0026 management snapshot. Their diagnostics and management roots match the shared TypeScript fixture; optional query, history, run, and replay panels stay host/runtime extensions until their native contracts are added.

use knolo_core_rust::{mount_knowledge_image, query_knowledge_image_v5};

let image = mount_knowledge_image(&v5_bytes)?;
let result = query_knowledge_image_v5(&image, "FROM chunk SEARCH \"retention\" LIMIT 20")?;
println!("{}", result.result_root);

Included in this initial release

  • mount_pack_from_bytes(&[u8]) -> Pack
  • query(&Pack, &str, QueryOptions) -> Vec<Hit>
  • Pack parsing support for:
    • meta
    • lexicon
    • postings
    • blocks (legacy string array and v3 object array)

Example

use knolo_core_rust::{mount_pack_from_bytes, query, QueryOptions};

let bytes: Vec<u8> = std::fs::read("knowledge.knolo")?;
let pack = mount_pack_from_bytes(&bytes)?;

let hits = query(
    &pack,
    "react native bridge throttling",
    QueryOptions {
        top_k: 5,
        ..Default::default()
    },
);

for hit in hits {
    println!("{} => {}", hit.source.unwrap_or_default(), hit.score);
}
# Ok::<(), Box<dyn std::error::Error>>(())