Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathCargo.toml
More file actions
473 lines (430 loc) · 15.8 KB
/
Cargo.toml
File metadata and controls
473 lines (430 loc) · 15.8 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
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
[workspace]
resolver = "3"
members = [
# Root package
".",
# SurrealDB crates
"surrealdb",
"surrealdb/common",
"surrealdb/ast",
"surrealdb/token",
"surrealdb/parser",
"surrealdb/core",
"surrealdb/server",
"surrealdb/types",
"surrealdb/types/derive",
# SurrealML crates
"surrealml/core",
# Surrealism crates
"surrealism",
"surrealism/demo",
"surrealism/macros",
"surrealism/runtime",
"surrealism/types",
# Other
"profiling",
]
[workspace.package]
authors = ["Tobie Morgan Hitchcock <tobie@surrealdb.com>"]
edition = "2024"
license-file = "LICENSE"
publish = false
version = "3.1.0-alpha"
description = "A scalable, distributed, collaborative, document-graph database, for the realtime web"
repository = "https://github.com/surrealdb/surrealdb"
homepage = "https://github.com/surrealdb/surrealdb"
keywords = [
"database",
"embedded-database",
"key-value",
"key-value-store",
"kv-store",
]
categories = ["database-implementations", "data-structures", "embedded"]
[workspace.dependencies]
# SurrealDB crates
surrealdb = { version = "3.1.0-alpha", path = "surrealdb", default-features = false }
surrealdb-core = { version = "3.1.0-alpha", path = "surrealdb/core", default-features = false }
surrealdb-server = { version = "3.1.0-alpha", path = "surrealdb/server", default-features = false }
surrealdb-types = { version = "3.1.0-alpha", path = "surrealdb/types" }
surrealdb-types-derive = { version = "3.1.0-alpha", path = "surrealdb/types/derive" }
ast = { package = "surrealdb-ast", path = "surrealdb/ast" }
token = { package = "surrealdb-token", path = "surrealdb/token" }
parser = { package = "surrealdb-parser", path = "surrealdb/parser" }
common = { package = "surrealdb-common", path = "surrealdb/common" }
# SurrealML crates
surrealml-core = { version = "0.1", path = "surrealml/core" }
# Surrealism crates
surrealism = { version = "0.2", path = "surrealism" }
surrealism-macros = { version = "0.2", path = "surrealism/macros", default-features = false }
surrealism-runtime = { version = "0.2", path = "surrealism/runtime" }
surrealism-types = { version = "0.2", path = "surrealism/types", default-features = false }
# External surreal crates
affinitypool = "0.4.0"
dmp = "0.2.3"
indxdb = "0.12.0"
lexicmp = "0.2.0"
revision = { version = "0.17.0", features = [
"bytes",
"chrono",
"geo",
"roaring",
"regex",
"rust_decimal",
"specialised-vectors",
"uuid",
] }
storekey = { version = "0.11.0", features = ["bytes", "uuid"] }
surrealkv = "0.21.0"
surrealmx = "0.18.0"
web-time = "1.1.0"
vart = "0.9.3"
## Maintained by @Delskayn
js = { version = "0.11.0", package = "rquickjs", features = ["rust-alloc"] }
reblessive = "0.4.3"
# External KV stores
rocksdb = { version = "0.24.0-surreal.3", package = "surrealdb-rocksdb", features = ["lz4", "snappy"] }
tikv = { version = "0.3.0-surreal.4", default-features = false, package = "surrealdb-tikv-client" }
# Other crates
addr = { version = "0.15.6", default-features = false, features = ["std"] }
ahash = "0.8.12"
ammonia = "4.1.2"
anyhow = "1.0.100"
arbitrary = "1.4.2"
arc-swap = "1.8.0"
argon2 = "0.5.3"
arrayvec = "0.7.6"
async-channel = "2.5.0"
async-executor = "1.13.3"
async-stream = "0.3.6"
async-graphql = { version = "7.2.0", default-features = false, features = ["custom-error-conversion"] }
async-graphql-axum = "7.2.0"
async-trait = "0.1.89"
base64 = "0.22.1"
bcrypt = "0.18.0"
bitflags = "2.10.0"
blake3 = "1.8.3"
boxcar = "0.2.14"
bytes = "1.11.1"
castaway = "0.2.4"
chrono = { version = "0.4.43", default-features = false }
ciborium = "0.2.2"
clap = "4.5.54"
dashmap = "6.1.0"
dialoguer = "0.11"
deunicode = "1.6.2"
ext-sort = "^0.1.5"
fastnum = "0.7.4"
flatbuffers = { version = "25.12.19", features = ["serde"] }
fst = "0.4.7"
futures = "0.3.31"
futures-util = "0.3.31"
fuzzy-matcher = "0.3.7"
geo = { version = "0.32.0", default-features = false }
geo-types = "0.7.18"
getrandom = "0.3.4"
hashbrown = "0.16.1"
hex = "0.4.3"
http = "1.4.0"
hyper = "1.8"
humantime = "2.3.0"
indexmap = "2.13.0"
ipnet = "2.11.0"
jemallocator = { version = "0.6.1", package = "tikv-jemallocator" }
jsonwebtoken = { version = "10.3.0", default-features = false, features = ["use_pem"] }
logos = "0.16.1" # TODO: pin version
md-5 = "0.10.6"
mimalloc = "0.1.48"
native-tls = "0.2.14"
ndarray = "0.17.2"
ndarray-stats = "0.7.0"
nix = { version = "0.30.1", default-features = false }
num-traits = "0.2.19"
num_cpus = "1.17.0"
object_store = "0.13.0"
papaya = "0.2.3"
parking_lot = "0.12.5"
paste = "1.0.15"
path-clean = "1.0.1"
pbkdf2 = "0.12.2"
phf = "0.13.1"
pin-project-lite = "0.2.16"
pprof = "0.15.0"
quick_cache = "0.6.18"
radix_trie = "0.3.0" # TODO: Look at the use of this dependency. Last update 4 years ago, unmaintained.
rand = { version = "0.8.5", features = ["small_rng"] }
rayon = "1.11.0"
regex = "1.12.2"
regex-syntax = "0.8.8"
reqwest = { version = "0.13.1", default-features = false }
ring = "0.17.14"
roaring = "0.11.3"
rustls = { version = "0.23.36", default-features = false, features = ["logging", "std", "tls12"] }
rust_decimal = "1.40.0"
rust-stemmers = "1.2.0" # TODO: Look at the use of this dependency. Last update 5 years ago, unmaintained.
scrypt = "0.11.0"
semver = "1.0.27"
serde = "1.0.228"
serde_json = "1.0.149"
sha1 = "0.10.6"
sha2 = "0.10.9"
snap = "1.1.1"
strsim = "0.11.1"
subtle = "2.6"
surrealdb-protocol = { version = "0.10.1", default-features = false }
sysinfo = "0.37.2"
tempfile = "3.24.0"
thiserror = "2.0.17"
tokio = { version = "1.49.0", default-features = false }
tokio-stream = "0.1"
tokio-tungstenite = "0.28.0"
tokio-tungstenite-wasm = "0.8.1"
tokio-util = "0.7.18"
tracing = { version = "0.1.44", features = ["release_max_level_debug"] }
ulid = "1.2.1"
unicase = "2.9.0"
url = "2.5.8"
uuid = "1.19.0"
wasm-bindgen-futures = "0.4.58"
wasmtimer = { version = "0.4.3", default-features = false }
# Dev dependencies
criterion = "0.8"
env_logger = "0.11"
flate2 = "1.1"
rstest = "0.26"
serial_test = "3.4"
temp-dir = "0.2"
test-log = "0.2"
time = "0.3"
tracing-subscriber = "0.3"
wiremock = "0.6"
# SurrealML specific dependencies
ort = { version = "2.0.0-rc.11", features = ["cuda", "ndarray"] }
# Surrealism specific dependencies
tar = "0.4.44"
toml = "0.9.11"
wasm-encoder = "0.245"
wasm-opt = "0.116.1"
wasmparser = "0.245"
wasmtime = { version = "43.0.1", default-features = false, features = ["async", "cranelift", "winch", "runtime", "std", "wat", "component-model", "parallel-compilation"] }
wasmtime-wasi = { version = "43.0.1", features = ["p1", "p2"] }
wit-bindgen = { version = "0.51", default-features = false, features = ["macros", "realloc"] }
zstd = "0.13.3"
[package]
name = "surreal"
publish = false
edition.workspace = true
version.workspace = true
authors.workspace = true
description.workspace = true
repository.workspace = true
homepage.workspace = true
keywords.workspace = true
categories.workspace = true
license-file.workspace = true
[features]
default = [
"allocator",
"allocation-tracking",
"storage-mem",
"storage-surrealkv",
"storage-rocksdb",
"storage-tikv",
"scripting",
"http",
"surrealism",
"graphql",
"cli",
]
allocator = ["surrealdb-server/allocator"]
allocation-tracking = ["surrealdb-server/allocation-tracking"]
http = ["surrealdb-server/http"]
jwks = ["surrealdb-server/jwks"]
ml = ["surrealdb-server/ml"]
scripting = ["surrealdb-server/scripting"]
surrealism = ["surrealdb-server/surrealism"]
storage-mem = ["surrealdb-server/storage-mem"]
storage-surrealkv = ["surrealdb-server/storage-surrealkv"]
storage-rocksdb = ["surrealdb-server/storage-rocksdb"]
storage-tikv = ["surrealdb-server/storage-tikv"]
storage-indxdb = ["surrealdb-server/storage-indxdb"]
# GraphQL API support
graphql = ["surrealdb-server/graphql"]
# Interactive SQL CLI support
cli = ["surrealdb-server/cli"]
[dependencies]
# workspace internal dependencies
surrealdb = { workspace = true, features = [
"protocol-http",
"protocol-ws",
"rustls",
] }
surrealdb-core.workspace = true
surrealdb-server.workspace = true
[target.'cfg(unix)'.dev-dependencies]
nix = { workspace = true, features = ["signal", "user"] }
[dev-dependencies]
assert_fs = "1.1.3"
chrono.workspace = true
web-time.workspace = true
ciborium.workspace = true
futures.workspace = true
futures-util.workspace = true
http.workspace = true
jsonwebtoken.workspace = true
rand.workspace = true
rcgen = "0.14.6"
reqwest = { workspace = true, default-features = false, features = [
"blocking",
"gzip",
"http2",
] }
semver.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
surrealism-runtime.workspace = true
surrealdb-types.workspace = true
test-log = { workspace = true, features = ["trace"] }
thiserror.workspace = true
tempfile.workspace = true
tokio = { workspace = true, features = ["macros", "signal", "tracing"] }
tokio-stream.workspace = true
tokio-tungstenite = { workspace = true, features = ["rustls-tls-webpki-roots"] }
tracing.workspace = true
ulid.workspace = true
[build-dependencies]
semver.workspace = true
[package.metadata.deb]
assets = [
[
"target/release/surreal",
"usr/share/surrealdb/surreal",
"755",
],
[
"pkg/deb/README",
"usr/share/surrealdb/README",
"644",
],
]
copyright = "SurrealDB Ltd. 2022"
depends = "$auto"
extended-description = "A scalable, distributed, collaborative, document-graph database, for the realtime web."
license-file = ["LICENSE", "4"]
maintainer = "Tobie Morgan Hitchcock <tobie@surrealdb.com>"
maintainer-scripts = "pkg/deb/"
priority = "optional"
section = "utility"
systemd-units = { enable = true }
[workspace.lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(docker)',
'cfg(storage)',
] }
[workspace.lints.clippy]
# Checks for usage of `#[allow]` attribute and suggests replacing it with `#[expect]`.
# `#[expect]` attributes suppress the lint emission, but emit a warning if the expectation is unfulfilled.
# This is useful to be notified when the lint is no longer triggered.
# https://rust-lang.github.io/rust-clippy/master/#allow_attributes
# TODO(stu): We should try to replace all of these with `#[expect]` instead. Setting to `allow` for now to avoid
# more changes.
allow_attributes = "allow"
# Checks for code like `foo = bar.clone();`.
# Custom `Clone::clone_from()` or `ToOwned::clone_into` implementations allow the objects to share resources and
# therefore avoid allocations.
# https://rust-lang.github.io/rust-clippy/master/#assigning_clones
assigning_clones = "warn"
# This lint allows boolean comparisons in assert-like macros.
# It is fine to use `assert_eq!(val, true)` in tests and is often more readable than `assert!(val)`.
# https://rust-lang.github.io/rust-clippy/master/#bool_assert_comparison
bool_assert_comparison = "allow"
# Checks for the usage of `as _` conversion using inferred type.
# https://rust-lang.github.io/rust-clippy/master/#cloned_instead_of_copied
cloned_instead_of_copied = "warn"
# Checks for function/method calls with a mutable parameter in `debug_assert!`, `debug_assert_eq!` and
# `debug_assert_ne!` macros.
# In release builds `debug_assert!` macros are optimized out by the compiler. Therefore mutating something in a
# `debug_assert!` macro results in different behavior between a release and debug build.
# https://rust-lang.github.io/rust-clippy/master/#debug_assert_with_mut_call
debug_assert_with_mut_call = "warn"
# Denies the configured methods and functions in `clippy.toml`.
# Some methods are undesirable in certain contexts, and it’s beneficial to lint for them as needed.
# https://rust-lang.github.io/rust-clippy/master/#disallowed_methods
disallowed_methods = "warn"
# Checks for explicit `.into_iter()` calls in for loops when the loop already implicitly calls it.
# Removing the explicit call makes the code more concise and idiomatic.
# https://rust-lang.github.io/rust-clippy/master/#explicit_into_iter_loop
explicit_into_iter_loop = "warn"
# Checks for impls of `From<..>` that contain `panic!()` or `unwrap()`
# TryFrom should be used if there’s a possibility of failure.
# https://rust-lang.github.io/rust-clippy/master/#fallible_impl_from
fallible_impl_from = "warn"
# Checks for usage of `.get().unwrap()` (or `.get_mut().unwrap()`) on a standard library type which implements Index.
# Using the Index trait ([]) is more clear and more concise.
# https://rust-lang.github.io/rust-clippy/master/#get_unwrap
get_unwrap = "warn"
# Checks for the usage of `_.to_owned()`, `vec.to_vec()`, or similar when calling `_.clone()` would be clearer.
# https://rust-lang.github.io/rust-clippy/master/#implicit_clone
implicit_clone = "warn"
# Checks for usage of `.to_string()` on an `&&T` where `T` implements `ToString` directly (like `&&str` or `&&String`).
# This bypasses the specialized implementation of ToString and instead goes through the more expensive string
# formatting facilities.
# https://rust-lang.github.io/rust-clippy/master/#inefficient_to_string
inefficient_to_string = "warn"
# Checks for large types being passed by value instead of by reference.
# Passing large types by value causes unnecessary copies and memory overhead on the stack.
# https://rust-lang.github.io/rust-clippy/master/#large_types_passed_by_value
large_types_passed_by_value = "warn"
# Checks for whole number float literals that cannot be represented as the underlying type without loss.
# If the value was intended to be exact, it will not be. This may be especially surprising when the lost precision
# is to the left of the decimal point.
# https://rust-lang.github.io/rust-clippy/master/#lossy_float_literal
lossy_float_literal = "warn"
# Checks for binding to underscore prefixed variable without side-effects.
# https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
no_effect_underscore_binding = "warn"
# Checks for usage of `.as_ref().cloned()` and suggests `.cloned()` instead.
# Using `.cloned()` directly is more concise and easier to read.
# https://rust-lang.github.io/rust-clippy/master/#option_as_ref_cloned
option_as_ref_cloned = "warn"
# Checks for unnecessary calls to `.clone()` on values that are already owned or about to be dropped.
# Redundant clones waste memory and CPU cycles without providing any benefit.
# https://rust-lang.github.io/rust-clippy/master/#redundant_clone
redundant_clone = "warn"
# Checks for usage of `.contains()` followed by `.insert()` on `HashSet` or `BTreeSet`.
# Using a single `.insert()` call and checking its return value is more efficient as it avoids double lookup.
# https://rust-lang.github.io/rust-clippy/master/#set_contains_or_insert
set_contains_or_insert = "warn"
# Checks for unnecessary calls to `to_owned()`, `to_string()` and other similar conversion methods
# that result in unnecessary allocations when a reference would suffice.
# https://rust-lang.github.io/rust-clippy/master/#unnecessary_to_owned
unnecessary_to_owned = "warn"
# Checks for functions that are declared `async` but have no `.await`s inside of them.
# Async functions with no async code create overhead, both mentally and computationally.
# https://rust-lang.github.io/rust-clippy/master/#unused_async
#
# SurrealDB relies on async functions in the AST parser and executor to avoid stack overflows.
# Warning or denying this lint can cause unexpected errors.
unused_async = "allow"
# Checks for `.unwrap()` or `.unwrap_err()` calls on Results and `.unwrap()` call on `Option`s.
# https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
unwrap_used = "warn"
# Checks for the use of bindings with a single leading underscore.
# https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
used_underscore_binding = "warn"
# Profiles
[profile.release]
codegen-units = 1
lto = true
opt-level = 3
panic = 'abort'
strip = true
[profile.bench]
strip = false
[profile.make]
inherits = "dev"
[profile.profiling]
debug = true
inherits = "release"
strip = false
panic = 'unwind'
You can’t perform that action at this time.
