-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCargo.toml
More file actions
114 lines (105 loc) · 5.51 KB
/
Copy pathCargo.toml
File metadata and controls
114 lines (105 loc) · 5.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
[package]
name = "perseus-vault"
version = "2.21.0"
edition = "2021"
description = "Persistent, encrypted memory engine for AI agents — MCP JSON-RPC stdio server"
repository = "https://github.com/Perseus-Computing-LLC/perseus-vault"
license = "MIT"
[[bin]]
name = "perseus-vault"
path = "src/main.rs"
[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
rusqlite = { version = "0.31", features = ["bundled"] }
# Connection pool so HTTP/SSE requests can read concurrently under WAL instead of
# serializing on a single Mutex<Connection> (rusqlite Connection is !Sync). (#210)
r2d2 = "0.8"
r2d2_sqlite = "0.24"
uuid = { version = "1", features = ["v4"] }
clap = { version = "4", features = ["derive"] }
rust-stemmers = "1.2"
aes-gcm = "0.10"
rand = "0.8"
base64 = "0.22"
# Runtime dep (also a build-dependency below): the journal audit chain uses
# SHA-256 for its tamper-evidence hash (2026-07-05 security review).
sha2 = "0.10"
axum = "0.7"
tokio = { version = "1", features = ["full"] }
tower-http = { version = "0.5", features = ["cors"] }
# Constant-time equality for auth-token comparison (avoids a timing side-channel
# on the Bearer secret). Already compiled transitively via aes-gcm; pinned here as
# a direct dep so the network-transport auth path can use it explicitly.
subtle = "2"
ureq = "2"
notify = "6"
serde_yaml = "0.9"
async-stream = "0.3"
futures = "0.3"
libc = "0.2"
# Optional: bundled embedding model (all-MiniLM-L6-v2 via ONNX Runtime)
ort = { version = "2.0.0-rc.12", optional = true, features = ["download-binaries"] }
# default-features=false drops tokenizers' `esaxx_fast` feature, which pulls in
# esaxx-rs — a C dep whose build.rs hardcodes `.static_crt(true)` (/MT). That
# clashes with ort's prebuilt /MD binaries on Windows MSVC (LNK2038/LNK1169) and
# fails to link. esaxx_fast only accelerates Unigram *training*; mimir only does
# inference (Tokenizer::from_file + encode), so dropping it is a no-op for us and
# lets bundled-embeddings link on Windows. Keep onig + progressbar (the other two
# defaults) so tokenizer behavior is otherwise unchanged. (#222)
tokenizers = { version = "0.23", optional = true, default-features = false, features = ["onig", "progressbar"] }
ndarray = { version = "0.17", optional = true } # MUST match the ndarray version ort rc.12 depends on, else our arrays are a different crate-version type and TensorArrayData (from_array_view) won't accept them (#212)
# prost/prost-types MUST stay on the same minor as tonic's own prost dep
# (tonic 0.13 -> prost 0.13): tonic-build's generated code derives OUR prost's
# `Message`, but tonic's codec requires ITS prost's `Message` — mixing 0.14
# with tonic 0.13 fails every RPC with "trait bound `X: prost::message::Message`
# is not satisfied". Caught by the grpc CI lane (#354).
tonic = { version = "0.13", optional = true, features = ["transport", "tls-ring"] }
prost = { version = "0.13", optional = true }
prost-types = { version = "0.13", optional = true }
tokio-stream = { version = "0.1", optional = true }
# Optional: local multimodal document text extraction (#236). DOCX via `zip` +
# in-tree XML text stripping; PDF via `pdf-extract`. Kept OUT of the default
# build so the lean single-binary / zero-dependency story is unchanged; enable
# with `--features multimodal`. All extraction is local (no cloud, no network).
zip = { version = "2", optional = true, default-features = false, features = ["deflate"] }
pdf-extract = { version = "0.12", optional = true }
# Target-specific deps must live AFTER every general [dependencies] entry —
# a [target.*] table header captures everything below it into that target's
# section. (First #751 commit put this block mid-list and silently demoted
# ort/tokenizers/ndarray/tonic/etc. to Windows-only, breaking 9 CI lanes on
# every non-Windows platform.)
[target.'cfg(windows)'.dependencies]
# Windows parent-death detection (#751): Toolhelp snapshot for parent-PID
# discovery + OpenProcess/GetProcessTimes liveness polling. Version pinned to
# the 0.52 already in the transitive tree (via mio/notify) to avoid a third
# windows-sys copy.
windows-sys = { version = "0.52", features = [
"Win32_Foundation",
"Win32_System_Threading",
"Win32_System_Diagnostics_ToolHelp",
] }
[features]
# bundled-embeddings is ON by default (#237): zero-config, zero-network dense /
# hybrid semantic search out of the box. The quantized all-MiniLM-L6-v2 model is
# fetched once by build.rs and compiled into the binary (no first-run download).
# Build a lean binary without it via `cargo build --no-default-features`.
default = ["bundled-embeddings"]
bundled-embeddings = ["ort", "tokenizers", "ndarray"]
# tokio-stream must be in this list: src/grpc.rs names it for the server
# streaming types (WatchJournalStream/StreamContextStream). It was optional
# but never wired to the feature, so the grpc build failed with
# "unresolved module or unlinked crate `tokio_stream`" (#354).
grpc = ["tonic", "prost", "prost-types", "tokio-stream", "tonic-build"]
# Local document text extraction for mimir_ingest_file (DOCX/PDF). Opt-in.
multimodal = ["zip", "pdf-extract"]
[dev-dependencies]
tower = { version = "0.5", features = ["util"] }
[build-dependencies]
tonic-build = { version = "0.13", optional = true }
# Used by build.rs to fetch the quantized embedding model into OUT_DIR at build
# time (only when the bundled-embeddings feature is active). Cached across builds.
ureq = "2"
# Verifies the SHA-256 of every fetched model asset before it is baked into the
# binary via include_bytes! (supply-chain pinning in fetch_model_assets).
sha2 = "0.10"