knolo-core-rust 4.0.0

Rust runtime support for reading and querying .knolo packs
Documentation
  • Coverage
  • 0%
    0 out of 33 items documented0 out of 8 items with examples
  • Size
  • Source code size: 19.86 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 501.77 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s 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. The TypeScript runtime is the Phase 5 v4 TrustBench reference until Rust supports the v4 container, analyzer identity, retrieval plan, and receipt contract.

Native Rust runtime support for Knolo .knolo packs.

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>>(())