microscope-memory 1.2.0

Pure binary cognitive memory engine with REST API bridge for LLM integration. Zero-JSON core, mmap-based, hierarchical, sub-microsecond search.
Documentation
[package]
name = "microscope-memory"

version = "1.2.0"
# Derived by letting clippy check it, not by guessing: raising this until
# `cargo clippy -- -D warnings` stops reporting incompatible_msrv is how 1.91 was
# found, after a hand-derived 1.88 was wrong about str::floor_char_boundary in
# src/narrative.rs. The dependency floor is lower (1.87.0, wasip2); this crate is
# what sets it. CI tests 1.98.1, so this is still derived rather than built on.
rust-version = "1.91"
edition = "2021"
authors = ["Microscope Contributors"]
description = "Pure binary cognitive memory engine with REST API bridge for LLM integration. Zero-JSON core, mmap-based, hierarchical, sub-microsecond search."
readme = "README.md"
homepage = "https://github.com/silentnoisehun/microscope-memory"
repository = "https://github.com/silentnoisehun/microscope-memory"
license = "MIT"
keywords = ["memory", "llm", "mmap", "vector-search", "api"]
categories = ["data-structures", "algorithms", "memory-management", "web-programming"]
exclude = [
    "layers/*",
    "output/*",
    ".github/*",
    "tests/fixtures/*",
    "tests/data/*",
    "scripts/*",
    "tools/*",
    "epistemic-core/",
    "microscope-hooks/",
    "*.txt",
    "*.log",
    "errors.txt",
    "compile_errors.txt",
    "test_errors.json",
]


[lib]
name = "microscope_memory"
path = "src/lib.rs"
crate-type = ["rlib", "cdylib"]

[[bin]]
name = "microscope-mem"
path = "src/main.rs"
required-features = ["native"]

[dependencies]
half = ">=2.3, <2.5"
serde = { version = "1.0", features = ["derive"] }
sha2 = "0.10"
blake3 = "1.5"
thiserror = "1.0"
bincode = "1.3"
toml = "0.8"
hmac = "0.12"
hex = "0.4"
rand = "0.8"
getrandom = { version = "0.2", features = ["js"] }
serde_json = "1.0"
zstd = { version = "0.13", optional = true }
microscope-hooks = { path = "microscope-hooks", version = "0.1.0" }
epistemic-core = { path = "epistemic-core", version = "0.1.0" }
# Spine: the mmap-backed state store in src/spine.rs. byteorder gives the
# little-endian POD (de)serialisation without pulling in serde on the hot
# path; parking_lot supplies the lock the stream cycle already runs behind
# (std::sync::Mutex is not reentrant and cannot be held across the tick).
byteorder = "1.5"
parking_lot = "0.12"


[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.52", features = ["Win32_System_Memory", "Win32_System_Threading", "Win32_Foundation", "Win32_System_LibraryLoader", "Win32_System_SystemInformation", "Win32_System_Registry", "Win32_System_Console", "Win32_System_Pipes", "Win32_Storage_FileSystem", "Win32_Security", "Win32_System_IO"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
memmap2 = "0.9"
rayon = "1.8"
clap = { version = "4", features = ["derive"] }
colored = "2"
axum = "0.7"
tokio = { version = "1.36", features = ["full"] }
tower-http = { version = "0.5", features = ["cors", "trace"] }
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "blocking"] }
# Optional features (native only — must not live under the wasm32 target
# section, otherwise the feature-gated crates are unresolvable on native builds)
pyo3 = { version = "0.29", features = ["extension-module"], optional = true }
wgpu = { version = "0.19", optional = true }
bytemuck = { version = "1.13", features = ["derive"], optional = true }
pollster = { version = "0.3", optional = true }
futures = { version = "0.3", optional = true }
candle-core = { version = "0.3", optional = true, features = [] }
candle-nn = { version = "0.3", optional = true }
candle-transformers = { version = "0.3", optional = true }
hf-hub = { version = "0.3", optional = true }
tokenizers = { version = "0.15", optional = true }
rmcp = { version = "3.5", default-features = false, features = ["server", "macros", "schemars", "transport-streamable-http-server"], optional = true }
schemars = { version = "1.0", optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2"
web-sys = { version = "0.3", features = ["console"] }
getrandom = { version = "0.2", features = ["js"] }

[features]
default = ["native"]
native = []
wasm = []
python = ["dep:pyo3"]
compression = ["zstd"]
gpu = ["wgpu", "bytemuck", "pollster", "futures"]
embeddings = ["candle-core", "candle-nn", "candle-transformers", "hf-hub", "tokenizers"]
cuda = ["embeddings", "candle-core/cuda"]
onnx = []
console_error_panic_hook = []
mcp_http = ["rmcp", "schemars"]

[dev-dependencies]
tempfile = "3.8"
criterion = "0.5"
tower = { version = "0.5", features = ["util"] }
# For tests/mcp_stdio.rs: the test spawns the real binary and parses its framed
# output, and writes the config it points the child at. Both crates are already
# in the tree as normal dependencies, so this adds no build cost.
serde_json = "1.0"
toml = "0.8"

[[bench]]
name = "microscope_bench"
harness = false

# Release and bench were tuned; dev was not, and it is what filled the disk.
# Cargo's default for dev is full debug info, which produced 204 MB rlibs and
# 157 MB pdbs -- roughly 4 GB for one debug build of this crate, which then had
# to be deleted to make room for the next one. line-tables-only keeps backtraces
# usable (file and line still resolve) and drops the bulk of the DWARF.
#
# This is developer-build only. It does not touch [profile.release] above, the
# CI, or anything shipped.
[profile.dev]
debug = "line-tables-only"


[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
panic = "abort"
strip = true



[profile.bench]
opt-level = 3
lto = "thin"
codegen-units = 1
strip = false



[package.metadata.wasm-pack.profile.release]
wasm-opt = false