Skip to content

Core ​

Core is a Rust engine distributed through a business C ABI and a safe Rust SDK.

flowchart LR
  App["Infrastructure application"] --> SDK["Safe Rust SDK"]
  SDK --> ABI["Business C ABI"]
  ABI --> Engine["Algorithms / model execution"]
CoreInfrastructure
Chunking and feature interpretationModel download/checksums/progress and model-byte loading
Semantic retrieval and rankingAccount keys and encryption
Reranking and deduplicationSQLite and synchronization
Tree/context proposalsHTTP and authorized mutations
BGE-M3 / ONNX execution and retrieval rerankingFiles, directories, database persistence, commands and UI

Inputs are authorized business material and opaque features; outputs are final results or proposals. There is no public vector, cosine or intermediate-rank API.

Core is a memory-only calculation engine. It receives model bytes, authorized records, opaque index data and explicit execution settings from its host. It does not open files or databases, resolve directories, read environment variables or choose storage names. Passing a path to Core so that Core opens it is outside this boundary. Serialization of an opaque index stays in Core; reading or persisting those bytes belongs to the infrastructure host.

The host does not interpret the opaque index format or reproduce chunking, ranking, deduplication, tree policies or request planning. These private algorithms and data structures remain in the binary Core. Opaque output is not a promise of encryption or resistance to reverse engineering.

Integration ruleRequirement
DistributionBinary SDK; consumed through the C ABI
OwnershipCore owns returned buffers; SDK uses RAII
PinningManifest hashes, exact compiler and matching target/CRT
CompatibilityPreserve legacy encrypted feature and storage formats
LicensingCore SDK permission is separate from infrastructure-source licensing

The host CLI's inference settings default to ~/.rsrs/inference.json, and models to ~/.rsrs/models/. Startup does not migrate old libraries. The host CLI provides explicit migration, preserving original user credentials and the old library. Explicit data/model-directory overrides remain available. Encryption migration uses versioned rsrs:* labels in the public CLI; keys do not enter Core.

Contracts · Development