-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
191 lines (161 loc) · 5.61 KB
/
Copy pathCargo.toml
File metadata and controls
191 lines (161 loc) · 5.61 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
[package]
name = "contextnest"
version = "0.1.0"
edition = "2021"
authors = ["Amir Khakshour <https://github.com/amirkhakshour>"]
description = "Continual-learning memory substrate for LLM agents — neural-field attractor consolidation"
license = "MIT"
repository = "https://github.com/SourceShift/ContextNest"
rust-version = "1.80"
keywords = ["llm", "agents", "memory", "context", "neural-field"]
categories = ["data-structures", "science"]
homepage = "https://contextnest.dev"
documentation = "https://docs.rs/contextnest"
readme = "README.md"
# Whitelist what ships in the published crate. Anything outside this list
# is excluded — keeps the crate size focused on what downstream users
# actually consume.
include = [
"src/**/*",
"tests/**/*",
"examples/**/*",
"build.rs",
"Cargo.toml",
"README.md",
"CHANGELOG.md",
"CONTRIBUTING.md",
"SECURITY.md",
"LICENSE",
]
[[bin]]
name = "contextnest"
path = "src/bin/contextnest.rs"
[features]
# Default feature set: v0.1.0 single-agent continual-learning memory substrate.
default = []
# Multi-agent cluster (canon Module 07). Adds field-based multi-agent coordination
# on top of the same neural-field substrate. v0.2+ work.
multi-agent = []
[dependencies]
# Core async runtime
tokio = { version = "1.36", features = ["full"] }
tokio-util = "0.7" # CancellationToken for protocol execution
async-trait = "0.1"
async-recursion = "1.0"
# Web framework
axum = { version = "0.7", features = ["ws"] }
tower = "0.5"
tower-http = { version = "0.6", features = ["cors", "trace", "auth", "compression-br", "request-id"] }
hyper = { version = "1.0", features = ["full"] }
http = "1.0"
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
# Database drivers
rusqlite = { version = "0.32", features = ["bundled"] }
neo4rs = "0.9.0-rc.6" # Neo4j driver
# Parser
tree-sitter = "0.26"
tree-sitter-rust = "0.24"
# Configuration
config = "0.15"
dotenvy = "0.15"
toml = "1.1"
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
log = "0.4"
# Error handling
anyhow = "1.0"
thiserror = "2.0"
# UUID generation
uuid = { version = "1.7", features = ["v4", "serde"] }
# HTTP client (for embeddings)
reqwest = { version = "0.11", features = ["json"] }
# Command line args
clap = { version = "4.5", features = ["derive"] }
# CLI dependencies
colored = "3.1"
inquire = "0.9"
indicatif = "0.18"
console = "0.16"
dialoguer = "0.12"
# Additional dependencies
chrono = { version = "0.4", features = ["serde"] }
futures = "0.3"
regex = "1.10"
num_cpus = "1.16"
threadpool = "1.8"
ordered-float = { version = "5.0", features = ["serde"] }
# Redis for rate limiting (optional)
redis = { version = "1.2", features = ["tokio-comp", "connection-manager"], optional = true }
# Security headers and validation
validator = { version = "0.18", features = ["derive"] }
# Cryptographic utilities
rand = "0.10"
base64 = "0.21"
hex = "0.4"
# HTTP security
# Performance optimization dependencies (Sprint 1)
parking_lot = "0.12" # Fast mutex for memory pools and caching
# Additional dependencies for advanced memory system
# Security: Force minimum safe versions
ring = "0.17.12"
ed25519-dalek = "2.1"
sha2 = "0.11"
rsa = "0.9"
p256 = "0.13"
elliptic-curve = "0.13"
nix = { version = "0.31", features = ["signal", "process", "user", "resource"] }
# Compression for response middleware
flate2 = "1.0"
# LLM provider abstraction (Phase J) — multi-provider (Anthropic, OpenAI, Google)
# with config-driven base_url override so z.ai / LiteLLM proxies plug in without
# code changes.
llm-sdk-rs = "0.3.0"
[dev-dependencies]
# Testing utilities
tempfile = "3.8"
env_logger = "0.10"
tokio-test = "0.4"
wiremock = "0.6"
criterion = "0.8"
proptest = "1.0"
axum-test = "15.0"
# ─── Build profiles ──────────────────────────────────────────────────────
#
# Default cargo profiles (`dev`, `release`) are tuned for two extremes:
# fast-to-compile-but-slow-to-run, and slow-to-compile-but-fast-to-run.
# Neither fits "I just edited one file and want to restart the server
# in 30 seconds with a usable optimized binary." These overrides + the
# custom `fast` profile fill that gap on workstations where the project
# target/ lives on a slower volume (e.g. docker-ssd).
# `cargo build --release` — used for the binary you actually run + publish.
# Override the upstream default (`incremental = false`) because every
# small edit otherwise triggers a full re-codegen of every touched
# crate. Incremental cuts the per-edit work to roughly the crates whose
# .rs files actually changed, which on this repo turns a 3-minute
# rebuild into ~20-30 seconds. The runtime cost is sub-1% — well below
# the inbox + retrieve lock-contention floor we already pay.
[profile.release]
incremental = true
# `cargo build --profile fast` — for the inner dev loop when you don't
# need maximum runtime speed but DO want an optimized-enough binary
# (no debug_assertions, no overflow checks, real opt level). codegen
# units are cranked to 256 so the 11 cores stay fed during clean
# builds. Use this when iterating on the server: produces
# `target/fast/contextnest` instead of `target/release/contextnest`.
#
# Trade-off: ~5-15% slower runtime than `--release` because the
# higher codegen-units count gives the optimizer less inter-function
# visibility. For ContextNest's IO + lock bound workloads the
# difference is invisible.
[profile.fast]
inherits = "release"
opt-level = 2
codegen-units = 256
lto = "off"
debug = false
debug-assertions = false
overflow-checks = false
incremental = true