-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
361 lines (289 loc) · 10.2 KB
/
Cargo.toml
File metadata and controls
361 lines (289 loc) · 10.2 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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
[package]
name = "reasonkit-core"
version = "0.1.6"
edition = "2021"
rust-version = "1.75"
authors = ["ReasonKit Team <team@reasonkit.sh>"]
description = "The Reasoning Engine — Auditable Reasoning for Production AI | Rust-Native | Turn Prompts into Protocols"
license = "Apache-2.0"
repository = "https://github.com/reasonkit/reasonkit-core"
homepage = "https://reasonkit.sh"
documentation = "https://docs.rs/reasonkit-core"
readme = "README.md"
keywords = ["rag", "llm", "reasoning", "knowledge-base", "ai"]
categories = ["command-line-utilities", "science", "algorithms", "development-tools"]
# Exclude large/unnecessary files from crates.io package
# Using include list for explicit control over package contents
include = [
"/src/**/*",
"/benches/**/*",
"/examples/**/*",
"/config/default.toml",
"/config/cli_defaults.toml",
"/protocols/**/*",
"/.cargo/config.toml",
"/Cargo.toml",
"/README.md",
"/LICENSE",
"/CHANGELOG.md",
"/SECURITY.md",
]
# Exclude patterns (redundant with include, but explicit for clarity)
exclude = [
"/assets/**/*",
"/docs/**/*",
"/scripts/**/*",
"/benchmarks/**/*",
"*.png",
"*.svg",
"*.jpg",
"*.gif",
]
[package.metadata.docs.rs]
# Don't use all-features (python/arf/local-embeddings require system deps not in docs.rs)
features = ["cli"]
rustdoc-args = ["--cfg", "docsrs"]
default-target = "x86_64-unknown-linux-gnu"
targets = [
"x86_64-unknown-linux-gnu",
"aarch64-apple-darwin",
"x86_64-pc-windows-msvc",
]
[badges]
maintenance = { status = "actively-developed" }
[lib]
name = "reasonkit"
path = "src/lib.rs"
crate-type = ["cdylib", "rlib"]
# Disable doctests to avoid compile-only example drift across feature sets
doctest = false
[[bin]]
name = "rk-core"
path = "src/main.rs"
[[bin]]
name = "rk-compare"
path = "src/bin/compare.rs"
[[bin]]
name = "rk-bench"
path = "src/bin/bench.rs"
[[example]]
name = "vibe_quick_start"
path = "examples/vibe_quick_start.rs"
required-features = ["vibe"]
[[example]]
name = "aesthetic_demo"
path = "examples/aesthetic_demo.rs"
required-features = ["aesthetic"]
[[example]]
name = "m2_integration_example"
path = "examples/m2_integration_example.rs"
required-features = ["minimax"]
[[example]]
name = "glm46_quick_start"
path = "examples/glm46_quick_start.rs"
required-features = ["glm46"]
# ============================================================================
# DEPENDENCIES
# ============================================================================
[dependencies]
# Python Integration - optional
# Note: pyo3 0.23+ removed ToPyObject trait, code uses 0.22.x API
pyo3 = { version = "0.28", features = ["extension-module"], optional = true }
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
base64 = "0.22"
web-sys = { version = "0.3.83", features = ["ReadableStream"] }
# PDF Processing
# Note: lopdf 0.35+ uses try_reserve error handling requiring Rust 1.77+
# (From<TryReserveError> for io::Error was stabilized in 1.77)
# lopdf 0.37+ requires Rust 1.85 (edition2024)
# Pinned to 0.34 for MSRV 1.75 compatibility
lopdf = "0.39"
# Text Processing
pulldown-cmark = "0.13"
scraper = "0.25"
regex = "1.12"
# URL Parsing (for SSRF protection)
# Note: url 2.5+ uses idna 1.x which requires icu_normalizer_data (Rust 1.83+)
# Pinned to exactly 2.4.1 for MSRV 1.75 compatibility
url = "=2.5.8"
# Vector Database (optional - use reasonkit-mem for full memory features)
qdrant-client = { version = "1.17", optional = true }
# Full-text Search (optional - use reasonkit-mem for full memory features)
tantivy = { version = "0.25", optional = true }
# Memory Infrastructure (optional - provides storage, retrieval, embeddings)
# Version required for crates.io publishing; path used for workspace development
reasonkit-mem = { version = "0.1", optional = true }
# Async Runtime
tokio = { version = "1", features = ["full"] }
# Additional async utilities
futures = { version = "0.3", default-features = false, features = ["std"] }
futures-util = { version = "0.3", features = ["std"] }
# HTTP Client
# Note: reqwest 0.12+ uses url 2.5+ which requires zerovec 0.11+ (Rust 1.82+)
# Pinned to 0.11.x for MSRV 1.75 compatibility (uses url 2.4 / idna 0.x)
reqwest = { version = "0.12", features = ["json", "stream", "rustls-tls"], default-features = false }
# CLI
clap = { version = "4", features = ["derive", "env"] }
clap_complete = "4.5"
# Error Handling
anyhow = "1.0"
thiserror = "2.0"
# Async traits
async-trait = "0.1"
# Logging & Telemetry
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
tracing-appender = { version = "0.2", optional = true }
# UUID
uuid = { version = "1", features = ["v4", "serde"] }
# Date/Time
chrono = { version = "0.4", features = ["serde"] }
# Cryptographic hashing for telemetry and caching
sha2 = "0.10"
# Secret management for API keys (prevents accidental Debug/log exposure)
secrecy = { version = "0.10", features = ["serde"] }
# SQLite for local telemetry storage
# Note: rusqlite 0.31+ requires newer Rust due to libsqlite3-sys using:
# - #[expect] attribute (Rust 1.81+)
# - c".." C string literals (Rust 1.77+)
# Pinned to 0.30 for MSRV 1.75 compatibility
rusqlite = { version = "0.38", features = ["bundled"] }
# Configuration
config = "0.15"
dotenvy = "0.15"
toml = "1.0"
num_cpus = "1.16"
# JSON Schema Validation - removed as unused and incompatible with MSRV 1.75
# (jsonschema 0.18+ requires idna 1.x / zerovec 0.11+ which needs Rust 1.82+)
# File watching (for hot reload)
# Note: notify 7+ uses notify-types 2.0+ which requires Rust 1.77+
# Pinned to 6.x for MSRV 1.75 compatibility
notify = "8"
# Rayon for parallel processing
# Note: rayon 1.11+ uses rayon-core 1.13 which requires Rust 1.80
# Pinned to 1.10.0 for MSRV 1.75 compatibility
rayon = "=1.11.0"
# Lazy initialization
once_cell = "1.19"
# Progress bars & Console
indicatif = "0.18"
console = { version = "0.16", features = ["std"] }
# Directories
directories = "6"
dirs = "6"
walkdir = "2.4"
# ONNX Runtime for local embeddings (BGE-M3)
# Note: ort 2.0+ uses edition2024, requires Rust 1.82+
# local-embeddings feature is excluded from MSRV check
ort = { version = "2.0.0-rc.10", optional = true }
# HuggingFace tokenizers
tokenizers = { version = "0.22", optional = true }
# NDArray for tensor operations (needed by ONNX)
ndarray = { version = "0.17", optional = true }
# ARF Module dependencies (optional feature)
sled = { version = "0.34", optional = true }
# Note: wasmtime 20+ uses cranelift with edition2024, pinned to 19.x for MSRV 1.75
wasmtime = { version = "42.0", optional = true }
# Note: sysinfo 0.30+ removed global_cpu_info(), 0.31+ changed Process::name() to OsStr
# Code uses 0.29.x API which has global_cpu_info() and Process::name() returns &str
sysinfo = { version = "0.38", optional = true }
petgraph = { version = "0.8", optional = true, features = ["serde-1"] }
rust-bert = { version = "0.23", optional = true, features = ["download-libtorch", "hf-tokenizers"], default-features = false }
parking_lot = { version = "0.12" } # Used for ws_auth connection tracking
md5 = { version = "0.8", optional = true } # For aesthetic engine config hashing
# Web Framework for WebSocket MCP Server
# Note: axum 0.8+ requires axum-core 0.5.5+ which needs Rust 1.78+
# Pinned to 0.7.x for MSRV 1.75 compatibility
axum = { version = "0.8", features = ["ws"] }
tower = "0.5"
tower-http = { version = "0.6", features = ["cors", "trace"] }
hyper = "1"
# ============================================================================
# DEV DEPENDENCIES
# ============================================================================
[dev-dependencies]
tokio-test = "0.4"
tempfile = "3.26"
pretty_assertions = "1.4"
criterion = { version = "0.8", features = ["html_reports", "async_tokio"] }
futures = "0.3"
# Property-based testing for comprehensive fuzzing and invariant verification
proptest = "1.10"
# ============================================================================
# BENCHMARKS
# ============================================================================
[[bench]]
name = "retrieval_bench"
harness = false
required-features = ["memory"]
[[bench]]
name = "fusion_bench"
harness = false
required-features = ["memory"]
[[bench]]
name = "embedding_bench"
harness = false
required-features = ["memory"]
[[bench]]
name = "raptor_bench"
harness = false
required-features = ["memory"]
[[bench]]
name = "ingestion_bench"
harness = false
required-features = ["memory"]
[[bench]]
name = "rerank_bench"
harness = false
required-features = ["memory"]
[[bench]]
name = "thinktool_bench"
harness = false
[[bench]]
name = "harness"
harness = false
required-features = ["memory"]
[[bench]]
name = "glm46_benchmark"
harness = false
required-features = ["glm46"]
# ============================================================================
# FEATURES
# ============================================================================
[features]
# Default feature set for general use
default = ["cli"]
# CLI binary support
cli = []
# Python bindings via PyO3
python = ["pyo3"]
# EXPERIMENTAL: VIBE Protocol Validation System
# Status: Incomplete - do not use in production
vibe = []
# Embedded Qdrant mode (no external server required)
embedded-qdrant = []
# Local BGE-M3 ONNX embeddings (no API calls needed)
local-embeddings = ["ort", "tokenizers", "ndarray"]
# ARF (Autonomous Reasoning Framework) module
arf = ["sled", "wasmtime", "sysinfo", "petgraph", "rust-bert"]
# Memory infrastructure via reasonkit-mem (vector storage, hybrid search, RAPTOR)
memory = ["dep:reasonkit-mem", "dep:qdrant-client", "dep:tantivy"]
# EXPERIMENTAL: Multi-language code intelligence
# Status: Incomplete - do not use in production
code-intelligence = []
# EXPERIMENTAL: MiniMax M2 enhanced ThinkTools
# Status: Incomplete - do not use in production
minimax = []
# EXPERIMENTAL: GLM-4.6 integration module
# Status: Incomplete - do not use in production
glm46 = []
# Aesthetic Expression Mastery System - M2-enhanced UI/UX assessment
aesthetic = ["md5"]
# MCP Daemon mode for persistent server connections
# Enables: daemon IPC, health monitoring, connection pooling
daemon = ["dep:tracing-appender"]
# Full feature set (excludes experimental)
full = ["cli", "memory", "local-embeddings", "aesthetic"]