cortext.rs
Rust bindings for Cortext — no C compiler
required at build time. The crate loads the cortext.cpp shared library at
runtime via libloading.
Natives and AIST model shards are not in this crate. On first use the package downloads the matching augmem/cortext.cpp release asset, verifies its SHA-256, and unpacks it:
cortext-assets-<version>.tar.gz
cortext-assets-<version>.tar.gz.sha256
Default assets version: 1.3.0 (ASSETS_VERSION).
Install
[]
= "1.3.1"
Use
process_text remains available for text-only input. To retain source media
alongside text, use process_text_with_media. Media.data is passed as
arbitrary binary and Media.mime_type / [Media::mimetype] is preserved as
supplied. ProcessOptions.include_embedding matches Python
(true by default); omit_embedding wins if both are set.
Custom stores match Python DBProvider / ObjectStoreProvider:
let memory = with_store?;
let memory = with_object_store?;
let memory = with_store_and_object?;
Assets
| Env | Purpose |
|---|---|
CORTEXT_ASSETS_VERSION |
Release version to fetch (default 1.3.0) |
CORTEXT_ASSETS_DIR |
Pre-unpacked release tree (native/ + models/) — skips download |
CORTEXT_ASSETS_URL |
Override archive URL |
CORTEXT_ASSETS_SHA256 |
Override expected archive checksum |
CORTEXT_ASSET_CACHE_DIR |
Parent cache dir for downloaded versions |
CORTEXT_LIBRARY_PATH |
Explicit shared library path (skips asset native selection) |
CORTEXT_AIST_MODEL_PATH |
Explicit full .gguf only when you need one on disk |
Load order:
CORTEXT_LIBRARY_PATHif set- Otherwise
ensure_assets()→native/<platform-tag>/…from the release tarball
Release natives embed AIST and assemble it on first create. materialize_model
is optional and always reads chunks from the same release asset tree.
Develop
CORTEXT_ASSETS_DIR=/path/to/unpacked/assets
License
Apache-2.0. Native engine binaries come from augmem/cortext.cpp releases.