-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
340 lines (294 loc) · 13.3 KB
/
Copy pathCargo.toml
File metadata and controls
340 lines (294 loc) · 13.3 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
[workspace]
members = [".", "crates/ladybug-contract"]
exclude = ["vendor"]
[package]
name = "ladybug"
version = "0.3.0"
edition = "2024"
rust-version = "1.94"
license = "Apache-2.0"
description = "Crystal Lake: Unified Cognitive Database with 4096 CAM Operations, Quantum-Inspired Operators, and 144 Verb Graph Substrate"
repository = "https://github.com/AdaWorldAPI/ladybug-rs"
keywords = ["database", "graph", "vector", "reasoning", "agi", "lance", "cognitive", "quantum"]
categories = ["database", "science", "algorithms", "simulation"]
readme = "README.md"
authors = ["AdaWorldAPI"]
[lib]
name = "ladybug"
crate-type = ["cdylib", "rlib"]
# =============================================================================
# FEATURES
# =============================================================================
[features]
default = ["simd", "parallel", "lancedb", "crewai", "spo_jina"]
# Core features
simd = [] # AVX-512 SIMD for Hamming operations
parallel = ["rayon"] # Parallel processing
# Storage backends
lancedb = ["lance"] # LanceDB vector storage
lance-zero-copy = [] # Zero-copy integration (uses Arrow buffers)
neo4j = ["neo4rs"] # Neo4j graph database
redis = ["dep:redis"] # Redis caching
# Extensions
python = ["pyo3"] # Python bindings
codebook = [] # Cognitive codebook (NSM, NARS, etc.)
hologram = [] # Holographic reduced representations
# SPO is always-on (no feature gate). Only the Jina HTTP client needs reqwest.
spo_jina = ["reqwest"]
compress = ["lz4"] # Compression support
quantum = [] # Quantum-inspired operators
bench = [] # Benchmark suite (comparison vs Qdrant/Milvus)
flight = ["arrow-flight", "tonic", "prost"] # Arrow Flight MCP server
crewai = ["flight"] # crewAI orchestration (A2A, agent cards, thinking templates)
json_fallback = [] # Legacy JSON MCP types (backwards compat)
# ndarray replaces rustynum (2026-03-22). Feature kept for test isolation only.
ndarray-hpc = []
# vendor-n8n and vendor-crewai are OBLIGATORY — always included.
# Feature flags kept as no-ops for backwards compatibility only.
vendor-n8n = []
vendor-crewai = []
# All features
full = [
"simd", "parallel", "python",
"codebook", "hologram", "spo_jina", "compress", "quantum",
"lancedb", "neo4j", "redis"
]
# =============================================================================
# CORE DEPENDENCIES
# =============================================================================
[dependencies]
ladybug-contract = { path = "crates/ladybug-contract" }
# -----------------------------------------------------------------------------
# Storage: LanceDB + Arrow ecosystem
# Lance 2.0.0 released on crates.io (Feb 5, 2026).
# Arrow 57.x aligns with DataFusion 52 / Lance 2.x.
# -----------------------------------------------------------------------------
lance = { version = "2.0", optional = true, default-features = false }
arrow = { version = "57", features = ["ffi"] }
arrow-array = "57"
arrow-schema = "57"
arrow-buffer = "57"
arrow-data = "57"
arrow-cast = "57"
arrow-select = "57"
parquet = { version = "57", features = ["snap", "lz4", "zstd"] }
arrow-flight = { version = "57", features = ["flight-sql-experimental"], optional = true }
arrow-ipc = "57"
# tonic/prost must match arrow-flight's versions (0.14.1)
tonic = { version = "0.14", optional = true }
prost = { version = "0.14", optional = true }
bytes = "1.11"
# -----------------------------------------------------------------------------
# Query: DataFusion SQL engine
# DataFusion 51.x - upgrade to 52 when liblzma conflict fixed
# To use DF 52: uncomment patch below and set datafusion = "52"
# -----------------------------------------------------------------------------
datafusion = "51"
sqlparser = "0.60"
# -----------------------------------------------------------------------------
# Graph: Neo4j driver
# -----------------------------------------------------------------------------
neo4rs = { version = "0.8", optional = true }
# -----------------------------------------------------------------------------
# Cache: Redis
# redis 1.0 — major rewrite, tokio-comp → tokio-rustls-comp
# -----------------------------------------------------------------------------
redis = { version = "1.0", features = ["tokio-rustls-comp", "json"], optional = true }
# -----------------------------------------------------------------------------
# Async runtime
# -----------------------------------------------------------------------------
tokio = { version = "1.49", features = ["full", "tracing"] }
futures = "0.3"
async-trait = "0.1"
# -----------------------------------------------------------------------------
# Parallelism
# -----------------------------------------------------------------------------
rayon = { version = "1.11", optional = true }
parking_lot = "0.12"
crossbeam = "0.8"
dashmap = "6.1"
# -----------------------------------------------------------------------------
# Serialization
# -----------------------------------------------------------------------------
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yml = "0.0.12"
bincode = "1.3"
rmp-serde = "1.3"
# -----------------------------------------------------------------------------
# Utilities
# -----------------------------------------------------------------------------
thiserror = "2.0"
snafu = { version = "0.8", features = ["backtrace"] }
nom = "7"
anyhow = "1.0"
uuid = { version = "1.20", features = ["v4", "serde"] }
hashbrown = { version = "0.15", features = ["serde"] }
smallvec = { version = "1.15", features = ["serde"] }
chrono = { version = "0.4", features = ["serde"] }
hex = "0.4"
base64 = "0.22"
sha2 = "0.10"
blake3 = "1"
rand = "0.9"
num-traits = "0.2"
num_cpus = "1.17"
itertools = "0.13"
once_cell = "1.21"
ctrlc = "3.4"
lazy_static = "1.5"
tracing = "0.1"
tracing-subscriber = "0.3"
# -----------------------------------------------------------------------------
# Compression
# -----------------------------------------------------------------------------
lz4 = { version = "1.28", optional = true }
# -----------------------------------------------------------------------------
# HTTP client (for SPO/external APIs)
# reqwest 0.12 — hyper 1.0 based, rustls default
# -----------------------------------------------------------------------------
reqwest = { version = "0.12", features = ["json", "rustls-tls"], optional = true }
# -----------------------------------------------------------------------------
# Python bindings
# pyo3 0.23 — latest stable with edition 2021+ support
# (0.28 requires edition 2024 build tooling changes)
# -----------------------------------------------------------------------------
pyo3 = { version = "0.23", optional = true, features = ["extension-module"] }
# -----------------------------------------------------------------------------
# Vendor: n8n-rs (workflow automation engine)
# Source: https://github.com/AdaWorldAPI/n8n-rs
# OBLIGATORY — always included. TIER 4 thinking styles depend on n8n-rs
# self-orchestration. Uses sibling directory locally, vendor/ in Docker.
# NOTE: n8n crates pin Arrow 53 / DataFusion 43. The Dockerfiles add
# [patch.crates-io] entries to unify Arrow/DataFusion to ladybug's versions.
# -----------------------------------------------------------------------------
n8n-core = { path = "../n8n-rs/n8n-rust/crates/n8n-core" }
n8n-workflow = { path = "../n8n-rs/n8n-rust/crates/n8n-workflow" }
n8n-arrow = { path = "../n8n-rs/n8n-rust/crates/n8n-arrow" }
n8n-grpc = { path = "../n8n-rs/n8n-rust/crates/n8n-grpc" }
n8n-hamming = { path = "../n8n-rs/n8n-rust/crates/n8n-hamming" }
# -----------------------------------------------------------------------------
# Vendor: crewai-rust (AI agent orchestration framework)
# Source: https://github.com/AdaWorldAPI/crewai-rust
# OBLIGATORY — always included. TIER 4 thinking styles depend on crewai-rust
# self-orchestration (A2A, agent cards, thinking templates).
# Renamed to crewai-vendor to avoid collision with ladybug's built-in crewai feature.
# -----------------------------------------------------------------------------
crewai-vendor = { package = "crewai", path = "../crewai-rust" }
# -----------------------------------------------------------------------------
# Vendor: ndarray (AdaWorldAPI fork with 55 HPC modules, replaces rustynum)
# Source: https://github.com/AdaWorldAPI/ndarray
# Provides runtime-dispatched kernels:
# - VPOPCNTDQ popcount/hamming via hpc::bitwise
# - VNNI int8 dot product via simd_avx2::dot_i8
# - Majority-vote bundle via hpc::hdc::HdcOps
# - BNN causal trajectory, cross-plane, shift detection
# - SigmaGate, CollapseGate, SignificanceLevel
# - Zero-copy Container bridge: view_u64_as_bytes()
# Requires: stable Rust 1.94+
# OBLIGATORY — always included, not behind a feature gate.
# Uses sibling directory locally, vendor/ in Docker.
# -----------------------------------------------------------------------------
ndarray = { path = "../ndarray" }
# All rustynum dependencies removed (2026-03-22). ndarray replaces everything.
# =============================================================================
# DEV DEPENDENCIES
# =============================================================================
[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
tempfile = "3.15"
tokio-test = "0.4"
proptest = "1.6"
pretty_assertions = "1.4"
# =============================================================================
# BENCHMARKS
# =============================================================================
[[bench]]
name = "hamming"
harness = false
[[bench]]
name = "fingerprint"
harness = false
[[bench]]
name = "cam_ops"
harness = false
# =============================================================================
# EXAMPLES
# =============================================================================
[[example]]
name = "basic_fingerprint"
path = "examples/basic_fingerprint.rs"
[[example]]
name = "cognitive_graph"
path = "examples/cognitive_graph.rs"
[[example]]
name = "quantum_ops"
path = "examples/quantum_ops.rs"
[[example]]
name = "cam_query"
path = "examples/cam_query.rs"
# =============================================================================
# BINARIES
# =============================================================================
[[bin]]
name = "ladybug-server"
path = "src/bin/server.rs"
[[bin]]
name = "ladybug-flight"
path = "src/bin/flight_server.rs"
required-features = ["flight"]
[[bin]]
name = "ladybug-bench"
path = "src/bin/bench.rs"
required-features = ["bench"]
# =============================================================================
# PROFILE: Release optimizations
# =============================================================================
[profile.release]
lto = "fat"
codegen-units = 1
opt-level = 3
panic = "abort"
[profile.bench]
lto = "thin"
opt-level = 3
# =============================================================================
# PATCH: DataFusion 52 upgrade (when ready)
# DataFusion 52 has internal liblzma conflict (0.4.4 vs 0.4.5)
# To enable: change datafusion = "52" above and uncomment patch below
# =============================================================================
# [patch.crates-io]
# Lance vendor patches — UNCOMMENT when lancedb feature is ready and
# submodules are checked out (git submodule update --init --recursive).
# These are NOT needed for production builds (simd,parallel,flight).
# Cargo validates ALL patch paths at resolution time regardless of features,
# so keeping these active breaks builds where submodules aren't cloned
# (Railway, GitHub Actions without actions/checkout submodules: true).
#
# lance = { path = "vendor/lance/rust/lance", default-features = false }
# lance-core = { path = "vendor/lance/rust/lance-core" }
# lance-io = { path = "vendor/lance/rust/lance-io", default-features = false }
# lance-file = { path = "vendor/lance/rust/lance-file" }
# lance-encoding = { path = "vendor/lance/rust/lance-encoding" }
# lance-table = { path = "vendor/lance/rust/lance-table" }
# lance-index = { path = "vendor/lance/rust/lance-index" }
# lance-arrow = { path = "vendor/lance/rust/lance-arrow" }
# lance-linalg = { path = "vendor/lance/rust/lance-linalg" }
# lance-datafusion = { path = "vendor/lance/rust/lance-datafusion" }
# lance-namespace = { path = "vendor/lance/rust/lance-namespace" }
# lance-geo = { path = "vendor/lance/rust/lance-geo" }
# lance-bitpacking = { path = "vendor/lance/rust/compression/bitpacking" }
# fsst = { path = "vendor/lance/rust/compression/fsst" }
# datafusion = { git = "https://github.com/AdaWorldAPI/datafusion", branch = "liblzma-fix" }
#
# n8n-rs vendor overrides — use local clones instead of git fetch:
# git clone https://github.com/AdaWorldAPI/n8n-rs vendor/n8n-rs
# n8n-core = { path = "vendor/n8n-rs/n8n-rust/crates/n8n-core" }
# n8n-workflow = { path = "vendor/n8n-rs/n8n-rust/crates/n8n-workflow" }
# n8n-arrow = { path = "vendor/n8n-rs/n8n-rust/crates/n8n-arrow" }
# n8n-grpc = { path = "vendor/n8n-rs/n8n-rust/crates/n8n-grpc" }
# n8n-hamming = { path = "vendor/n8n-rs/n8n-rust/crates/n8n-hamming" }
#
# crewai-rust vendor override — use local clone instead of git fetch:
# git clone https://github.com/AdaWorldAPI/crewai-rust vendor/crewai-rust
# crewai = { path = "vendor/crewai-rust" }