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
115
116
117
118
119
120
121
122
123
[]
= "mnem-http"
= "HTTP JSON API for mnem - REST surface over the core repo operations."
= true
= true
= true
= true
= true
= true
= true
= ["database", "web-programming::http-server"]
= ["mnem", "knowledge-graph", "http", "rest", "api"]
= "README.md"
= "https://docs.rs/mnem-http"
[[]]
= "mnem-http"
= "src/main.rs"
[]
= "src/lib.rs"
# docs.rs: render the default (no-onnx) surface. The `*-onnx` features
# forward to the three provider crates' `onnx` features, which pull
# `ort` with `download-binaries` - needs outbound network at build
# time that the docs.rs sandbox blocks. The route/handler types
# are feature-orthogonal so the default build already covers them.
[]
= ["--cfg", "docsrs"]
[]
= true
[]
= []
# Forward `sparse-onnx` / `rerank-onnx` / `embed-onnx` into the
# corresponding provider crate so `cargo build -p mnem-http
# --features sparse-onnx` pulls in the native in-process encoders.
# Leaving them off keeps the default HTTP build small and WASM-clean.
= ["mnem-sparse-providers/onnx"]
= ["mnem-rerank-providers/onnx"]
= ["mnem-embed-providers/onnx"]
= ["sparse-onnx", "rerank-onnx", "embed-onnx"]
# Path A bundled-embedder: in-process MiniLM via ort/download-binaries.
# Mutually exclusive with `embed-onnx` (mnem-embed-providers enforces).
# Use for benchmark harnesses where no host onnxruntime is available.
= ["mnem-embed-providers/onnx-bundled"]
= ["embed-onnx-bundled"]
[]
= { = true }
= { = true }
# Transport crate supplies CAR writer/reader primitives + protocol
# constants (PROTOCOL_VERSION, PROTOCOL_HEADER, CAPABILITIES_HEADER,
# Capability enum) that the `/remote/v1/*` routes advertise and frame
# against. No runtime state crosses the boundary; this dep is
# stateless codec + constant re-exports.
= { = true }
# BENCH-1 (C4): `mock` feature enables the deterministic blake3-based
# MockEmbedder so the cold-start retrieve fallback in `handlers.rs`
# can degrade gracefully when no `[embed]` is configured. Network-free,
# always-available; the real provider config still wins when present.
= { = true, = ["mock"] }
= { = true }
= { = true }
= { = true }
# Phase-B5d: wires `POST /v1/ingest`. Ingest pipeline (parse + chunk +
# rule-based NER). `keybert` feature (C3 FIX-3) forwards the KeyBERT
# statistical adapter so `POST /v1/ingest` with `extractor=keybert`
# runs against the server's configured embedder; zero-cost otherwise.
= { = true, = ["keybert"] }
# E4 T2: Centroid+MMR extractive summarizer. Zero-impact when the
# `?summarize=...` query parameters are absent from the request.
= { = true }
# E0 wire activation (Patch-B): when the authored-edges adjacency is
# empty under `/v1/nodes/bulk` + retrieve, derive a deterministic
# KNN-edge substrate from the brute-force vector index via
# `mnem_ann::derive_knn_edges_from_vectors`. We explicitly disable
# default features so the `hnsw` backend (and its `instant-distance`
# dep) is NOT pulled in; we only need the vector-space KNN derivation
# which is unconstrained.
= { = true, = false }
= { = "0.8", = false, = ["http1", "json", "query", "tokio", "matched-path", "multipart"] }
= { = "1", = ["rt-multi-thread", "macros", "signal", "net"] }
= "0.5"
= { = "0.5", = ["cors", "trace"] }
= { = true, = ["derive"] }
= "1"
= "1"
= { = "4.5", = ["derive"] }
= { = true }
= { = "0.3", = ["env-filter", "fmt", "json"] }
= "1"
= { = true }
= { = true }
# UUIDv7 for per-request correlation ids. Workspace already pins uuid
# with `v7` + `std`; reusing the same crate avoids a second RNG path.
# Correlation ids live in tracing-span fields and the `X-Request-Id`
# response header ONLY; they are NEVER used as a metric label (would
# explode cardinality). See docs/LOGGING.md.
= { = true }
# Prometheus text-exposition metrics on `/metrics`. `prometheus-client`
# (vs the older `prometheus` crate) is the maintained, official
# implementation: smaller dep graph, no internal `Mutex` in the hot
# path (lock-free atomics for counters + histograms), and a static-typed
# registry that catches duplicate-name regressions at compile time. The
# per-request hit is one atomic increment per metric family, well under
# 100 ns on x86-64, which is noise next to axum route dispatch.
= "0.23"
[]
= "0.1"
= { = "0.5", = ["util"] }
= "3"
# Used only by `examples/smoke_client.rs` to hit the spawned server over
# a real TCP socket. Keeping this under dev-dependencies means a
# downstream consumer pulling `mnem-http` as a library never builds
# ureq transitively; it's only compiled for `cargo run --example`.
= { = "2.12", = false }
# gap-06 proptest: `byte_cap_never_exceeds_budget` invariant for the
# `/v1/explain` runtime-derived byte cap. Workspace-pinned so the
# version tracks the rest of the workspace proptest users.
= { = true }