-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
299 lines (264 loc) · 10 KB
/
Cargo.toml
File metadata and controls
299 lines (264 loc) · 10 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
[workspace]
resolver = "2"
members = [
"pg",
"pg/crates/kalam-pg-common",
"pg/crates/kalam-pg-api",
"pg/crates/kalam-pg-fdw",
"pg/crates/kalam-pg-types",
"pg/crates/kalam-pg-client",
"backend/crates/kalamdb-macros",
"backend/crates/kalamdb-commons",
"backend/crates/kalamdb-configs",
"backend/crates/kalamdb-filestore",
"backend/crates/kalamdb-streams",
"backend/crates/kalamdb-sharding",
"backend/crates/kalamdb-session",
"backend/crates/kalamdb-session-datafusion",
"backend/crates/kalamdb-transactions",
"backend/crates/kalamdb-datafusion-sources",
"backend/crates/kalamdb-system",
"backend/crates/kalamdb-tables",
"backend/crates/kalamdb-dba",
"backend/crates/kalamdb-observability",
"backend/crates/kalamdb-vector",
"backend/crates/kalamdb-core",
"backend/crates/kalamdb-live",
"backend/crates/kalamdb-handlers",
"backend/crates/kalamdb-handlers/crates/support",
"backend/crates/kalamdb-handlers/crates/admin",
"backend/crates/kalamdb-handlers/crates/ddl",
"backend/crates/kalamdb-handlers/crates/stream",
"backend/crates/kalamdb-handlers/crates/user",
"backend/crates/kalamdb-jobs",
"backend/crates/kalamdb-plan-cache",
"backend/crates/kalamdb-publisher",
"backend/crates/kalamdb-dialect",
"backend/crates/kalamdb-store",
"backend/crates/kalamdb-api",
"backend/crates/kalamdb-auth",
"backend/crates/kalamdb-raft",
"backend/crates/kalamdb-views",
"backend/crates/kalamdb-pg",
"backend/crates/kalamdb-server-auth",
"backend",
"link/link-common",
"link/kalam-client",
"link/kalam-consumer-wasm",
"link/kalam-link-dart",
"cli"
]
exclude = ["benchv2"]
[workspace.package]
version = "0.4.3-rc.4"
edition = "2021"
rust-version = "1.92"
authors = ["KalamDB Team"]
license = "Apache-2.0"
repository = "https://github.com/kalamstack/KalamDB"
# Shared dependencies for all crates
[workspace.dependencies]
# Serialization
serde = { version = "1.0", features = ["derive", "rc"] }
serde_json = "1.0.149"
# Error handling
thiserror = "2.0.18"
anyhow = "1.0.102"
# Logging
log = "0.4.29"
# Async runtime
tokio = { version = "1.52.1", features = ["rt-multi-thread", "macros", "sync", "time", "fs", "io-util", "io-std", "net", "signal", "parking_lot"] }
tokio-stream = { version = "0.1", features = ["net"] }
# HTTP client (with HTTP/2 support) - using rustls-tls for cross-compilation compatibility
# Note: native-tls requires OpenSSL which is difficult to cross-compile for aarch64
reqwest = { version = "0.13.2", default-features = false, features = ["json", "rustls", "http2", "multipart", "stream", "form"] }
hyper = { version = "1.8.1", default-features = false, features = ["client", "http1"] }
hyper-util = { version = "0.1.20", default-features = false, features = ["client", "client-legacy", "http1", "tokio"] }
url = "2.5.8"
# WebSocket
tokio-tungstenite = { version = "0.29.0", features = ["rustls-tls-webpki-roots"] }
# Security floor pins for vulnerable transitive TLS/QUIC crates.
aws-lc-rs = { version = "1.16.3", default-features = false }
quinn-proto = { version = "0.11.14", default-features = false }
rustls-webpki = { version = "0.103.13", default-features = false }
# Time handling
chrono = { version = "0.4.44", features = ["serde"] }
# Storage
rocksdb = { version = "0.24.0", default-features = false, features = ["snappy", "multi-threaded-cf", "bindgen-runtime"] }
# Apache Arrow ecosystem
# IMPORTANT: arrow, arrow-schema and parquet MUST match the version used by DataFusion.
# DataFusion 52.3.0 resolves to Arrow 57.3.0; mixing in Arrow 58 pulls a second
# arrow_array crate into the graph and causes FixedSizeListArray type mismatches.
# Upgrade DataFusion first before bumping Arrow/Parquet beyond this family.
arrow = { version = "58.1.0", default-features = false }
arrow-ipc = { version = "58.1.0", default-features = false }
arrow-schema = { version = "58.1.0" }
datafusion = { version = "53.1.0", default-features = false, features = ["sql", "parquet", "recursive_protection", "nested_expressions"] }
datafusion-datasource = { version = "53.1.0", default-features = false }
datafusion-common = { version = "53.1.0", default-features = false }
datafusion-expr = { version = "53.1.0" }
datafusion-functions-json = { version = "0.53.1" }
sqlparser = { version = "0.61.0" }
parquet = { version = "58.1.0", default-features = false, features = ["snap", "zstd", "arrow", "async"] }
# Web framework
actix-web = { version = "4.13.0", features = ["http2"] }
actix-ws = "0.4.0"
actix-cors = "0.7"
actix-rt = "2.10"
actix-files = "0.6.10"
actix-multipart = "0.7"
# UUID generation
uuid = { version = "1.23.1", features = ["v4", "v7", "serde"] }
# NanoID generation (21-char URL-safe unique IDs)
nanoid = "0.5.0"
# ULID generation
ulid = "1.1"
# JWT authentication
jsonwebtoken = { version = "10.3.0", default-features = false, features = ["aws_lc_rs"] }
# Configuration
toml = "1.1.0"
dotenv = "0.15"
# CLI tools
clap = { version = "4.6.1", features = ["derive", "color"] }
rustyline = { version = "18.0.0" }
# System
num_cpus = "1.16"
sysinfo = { version = "0.38.4", default-features = false, features = ["system", "disk"] }
hostname = "0.4"
# Testing
tempfile = "3.27.0"
wait-timeout = "0.2"
serial_test = "3.3.1"
# Benchmarking
criterion = { version = "0.8.2", features = ["html_reports"] }
# Raft consensus
openraft = { version = "0.9.24", features = ["serde"] }
rmp = "0.8"
rmp-serde = "1.3"
# gRPC for Raft network layer
tonic = { version = "0.14.5" }
tonic-prost = "0.14.5"
tonic-build = "0.14.4"
prost = "0.14.3"
prost-types = "0.14.3"
# Additional dependencies
bcrypt = "0.19.0"
rand = "0.10.1"
rcgen = "0.14.1"
x509-parser = "0.18.1"
kalamdb-commons = { path = "backend/crates/kalamdb-commons", default-features = false }
kalamdb-plan-cache = { path = "backend/crates/kalamdb-plan-cache" }
kalamdb-tables = { path = "backend/crates/kalamdb-tables" }
kalamdb-views = { path = "backend/crates/kalamdb-views" }
kalamdb-datafusion-sources = { path = "backend/crates/kalamdb-datafusion-sources" }
cookie = "0.18"
colored = "3.1.1"
fern = "0.7"
indicatif = "0.18.4"
rpassword = "7.5.1"
dirs = "6.0"
term_size = "0.3"
crossterm = "0.29.0"
assert_cmd = "2.2.1"
predicates = "3.1.4"
futures-util = { version = "0.3.32", default-features = false }
base64 = "0.22"
flatbuffers = "25.12.19"
flexbuffers = "25.9.23"
async-trait = "0.1.74"
once_cell = "1.21.4"
regex = "1.12.3"
dashmap = "6.1"
bytes = "1.11.1"
http-body = "1.0.0"
http-body-util = "0.1.2"
cc = "1.2.61"
proc-macro2 = "1.0.106"
quote = "1.0.44"
syn = { version = "2.0.117", features = ["full", "extra-traits"] }
# Object storage abstraction (S3/GCS/Azure/local)
object_store = { version = "0.13.2" }
# Vector ANN engines
usearch = "2.25.1"
parking_lot = "0.12"
tokio-util = "0.7.18"
hex = "0.4"
hmac = "0.13.0"
sha2 = "0.11.0"
storekey = "0.11"
moka = { version = "0.12.15", features = ["future", "sync"] }
ntest = "0.9.5"
ipnet = "2.11.0"
wasm-bindgen = { version = "0.2.120" }
wasm-bindgen-futures = { version = "0.4.70" }
js-sys = { version = "0.3.97" }
libc = "0.2.186"
libmimalloc-sys = { version = "0.1.47", features = ["extended"] }
web-sys = { version = "0.3.97" }
tsify = { version = "0.5.6", default-features = false, features = ["js"] }
serde-wasm-bindgen = "0.6.5"
flate2 = "1.1.9"
tar = "0.4"
zip = { version = "8.6.0", default-features = false, features = ["deflate"] }
miniz_oxide = "0.9.1"
flutter_rust_bridge = "=2.12.0"
rust-embed = { version = "8.11.0", features = ["compression", "include-exclude"] }
mime_guess = "2.0"
kalamdb-configs = { path = "backend/crates/kalamdb-configs" }
kalamdb-server = { path = "backend" }
pgrx = "=0.18.0"
pgrx-bench = "=0.18.0"
pgrx-tests = "=0.18.0"
tokio-postgres = "0.7.17"
# Tracing / observability
tracing = "0.1"
tracing-subscriber = { version = "0.3.23", features = ["env-filter", "json", "fmt"] }
tracing-actix-web = "0.7.21"
tracing-log = "0.2"
tracing-opentelemetry = "0.32.1"
opentelemetry = "0.31.0"
opentelemetry_sdk = { version = "0.31.0", features = ["trace", "rt-tokio"] }
opentelemetry-otlp = { version = "0.31.0", default-features = false, features = ["trace", "grpc-tonic", "http-proto"] }
# Release profile: balanced for production use (good performance + reasonable size)
[profile.release]
opt-level = 3 # Full speed optimizations
lto = "thin" # Thin LTO: removes cross-crate dead code without huge link times
codegen-units = 1 # Single codegen unit for better optimization
panic = "abort" # Removes stack unwinding code (~5-10% savings)
strip = true # Strip symbols from the binary
# Custom profile for distribution builds (smallest possible binary)
# Use with: cargo build --profile release-dist
[profile.release-dist]
inherits = "release"
opt-level = "z" # Optimize for size (most aggressive)
lto = true # Full LTO (slower link, best dead-code elimination)
# Custom profile for Docker builds (smallest usable binary for containers)
# Uses full LTO for maximum dead-code elimination to reduce loaded code pages.
# Use with: cargo build --profile docker
[profile.docker]
inherits = "release"
opt-level = "z" # Optimize for size (most aggressive)
lto = true # Full LTO: best dead-code elimination for minimal RSS
# Custom profile for PostgreSQL extension builds (smallest possible .so)
# Uses size optimization + full LTO + panic=unwind (required by pgrx)
# Use with: cargo pgrx install --profile release-pg
[profile.release-pg]
inherits = "release"
opt-level = "z" # Optimize for size
lto = true # Full LTO for maximum dead-code elimination
panic = "unwind" # Required by pgrx (PostgreSQL longjmp unwinding)
[profile.dev]
opt-level = 0 # no optimizations = faster compile
debug = 0 # minimal debug info = faster linking
incremental = true # incremental builds
lto = "off" # no link-time optimization
codegen-units = 256 # maximum parallelism for codegen
split-debuginfo = "unpacked" # faster on macOS
[profile.dev.build-override]
opt-level = 0
debug = 0
codegen-units = 256
[profile.test.build-override]
opt-level = 0
debug = 0
codegen-units = 256