forked from stoolap/stoolap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
224 lines (185 loc) · 6.32 KB
/
Cargo.toml
File metadata and controls
224 lines (185 loc) · 6.32 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
[package]
name = "stoolap"
version = "0.3.2"
edition = "2021"
build = "cairo/build.rs"
authors = ["Stoolap Contributors"]
description = "High-performance embedded SQL database with MVCC, time-travel queries, and full ACID compliance"
license = "Apache-2.0"
repository = "https://github.com/stoolap/stoolap"
homepage = "https://stoolap.io"
documentation = "https://stoolap.io/docs/"
readme = "README.md"
keywords = ["database", "sql", "embedded", "mvcc", "acid"]
categories = ["database", "database-implementations"]
[lib]
name = "stoolap"
path = "src/lib.rs"
crate-type = ["cdylib", "rlib"]
[[bin]]
name = "stoolap"
path = "src/bin/stoolap.rs"
required-features = ["cli"]
# PG server will be enabled once implemented
# [[bin]]
# name = "stoolap-pgserver"
# path = "src/bin/pgserver.rs"
# required-features = ["pg-server"]
[dependencies]
# Error handling
thiserror = "2.0"
anyhow = "1.0"
# Plugin loading (for STWO verification plugin)
libloading = "0.8"
# Concurrency
parking_lot = "0.12"
dashmap = "6"
crossbeam = "0.8"
rayon = { version = "1.11", optional = true }
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
# Deterministic Floating-Point (DFP) per RFC-0104
octo-determin = { path = "../../ai/cipherocto/determin" }
# Time handling
chrono = { version = "0.4", features = ["serde"] }
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# CLI (optional)
clap = { version = "4.4", features = ["derive"], optional = true }
rustyline = { version = "17.0", optional = true }
comfy-table = { version = "7.2", optional = true }
dirs = { version = "6.0", optional = true }
# Checksums for data integrity
crc32fast = "1.4"
# Compression
lz4_flex = "0.12"
# Utilities
bytes = "1.5"
smallvec = "1.11"
ordered-float = "5.1"
indexmap = "2.1"
rustc-hash = "1.1"
memchr = "2.6"
regex = "1.10"
radsort = "0.1" # Radix sort - O(n) for integer keys
rand = "0.9" # Random number generation for RANDOM() function
ahash = "0.8" # Fast hash for hash indexes (DOS-resistant)
hashbrown = "0.16" # HashMap with raw_entry API for efficient group-by
roaring = "0.11" # Compressed bitmap indexes (used by Lucene, Druid, Spark)
lru = "0.16" # O(1) LRU cache for compiled expression programs
hex = { version = "0.4", optional = true } # Hex encoding for ZK proofs
# Optional benchmark dependencies (for comparison benchmarks)
rusqlite = { version = "0.32", features = ["bundled"], optional = true }
duckdb = { version = "1.4.3", features = ["bundled"], optional = true }
# Optional allocators
mimalloc = { version = "0.1", default-features = false, optional = true }
# Semantic embedding (optional — enables EMBED() SQL function)
candle-core = { version = "0.9", optional = true }
candle-nn = { version = "0.9", optional = true }
candle-transformers = { version = "0.9", optional = true }
tokenizers = { version = "0.22", default-features = false, features = ["progressbar", "fancy-regex"], optional = true }
hf-hub = { version = "0.4", optional = true }
sha2 = "0.10.9"
# Zero-knowledge proofs (optional)
# Note: Full STWO support moved to stwo-plugin crate (requires nightly to build)
# The zk feature here provides types and stubs only - use plugin for actual proofs
blake3 = { version = "1.5", optional = true }
memmap2 = { version = "0.9", optional = true }
which = { version = "7.0", optional = true }
tempfile = { version = "3.9", optional = true }
starknet-crypto = { version = "0.6", optional = true }
# Platform-specific file locking
[target.'cfg(unix)'.dependencies]
libc = "0.2"
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Storage_FileSystem", "Win32_System_IO"] }
# WASM dependencies
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2"
js-sys = "0.3"
web-sys = { version = "0.3", features = ["console", "Performance", "Window"] }
getrandom_02 = { package = "getrandom", version = "0.2", features = ["js"] }
getrandom_03 = { package = "getrandom", version = "0.3", features = ["wasm_js"] }
web-time = "1.1"
[dev-dependencies]
criterion = { version = "0.8", features = ["html_reports"] }
proptest = "1.4"
tempfile = "3.9"
dhat = "0.3"
[features]
default = ["cli", "parallel", "vector"]
parallel = ["dep:rayon"]
wasm = [] # Excludes parallel + persistence; for wasm32 builds
cli = ["clap", "rustyline", "comfy-table", "dirs"]
dhat-heap = []
sqlite = ["dep:rusqlite"]
duckdb = ["dep:duckdb"]
mimalloc = ["dep:mimalloc"]
semantic = ["candle-core", "candle-nn", "candle-transformers", "tokenizers", "hf-hub"]
zk = ["dep:blake3", "dep:which", "dep:tempfile", "dep:hex"] # ZK types and plugin loader (stable compatible)
commitment = ["dep:starknet-crypto", "dep:blake3"] # Pedersen commitments + confidential queries (stable compatible)
vector = ["dep:blake3", "dep:memmap2", "dep:tempfile"] # Vector storage with Merkle + mmap
[[example]]
name = "benchmark_sqlite"
required-features = ["sqlite"]
[[example]]
name = "benchmark_duckdb"
required-features = ["duckdb"]
[[example]]
name = "semantic_search"
required-features = ["semantic"]
[profile.release]
# RFC-0104: Disable overflow checks for deterministic floating-point (DFP)
# DFP uses saturating arithmetic, not wrapping
overflow-checks = false
lto = true
codegen-units = 1
panic = "abort"
opt-level = 3
debug = true # Enable debug symbols for profiling
[[bench]]
name = "select_by_id"
harness = false
[[bench]]
name = "update_by_id"
harness = false
[[bench]]
name = "delete_by_id"
harness = false
[[bench]]
name = "select_complex"
harness = false
[[bench]]
name = "update_complex"
harness = false
[[bench]]
name = "delete_complex"
harness = false
[[bench]]
name = "hexary_proof"
harness = false
[[bench]]
name = "stark_proof"
harness = false
[[bench]]
name = "vector_search"
harness = false
required-features = ["vector"]
[profile.bench]
lto = true
codegen-units = 1
# Test profile: inherits from release for DFP determinism
# Run with: cargo test --profile test
[profile.test]
inherits = "release"
overflow-checks = false # RFC-0104: Required for deterministic floating-point
lto = "thin" # Faster compilation for tests
codegen-units = 16 # Parallel codegen
# CI test profile: faster compile, less disk usage
[profile.ci]
inherits = "release"
lto = "thin" # Much faster than full LTO
codegen-units = 16 # Parallel codegen
debug = false # No debug symbols needed for tests