forked from surrealdb/surrealdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
463 lines (426 loc) · 13.5 KB
/
Cargo.toml
File metadata and controls
463 lines (426 loc) · 13.5 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
[workspace]
members = [".", "crates/core", "crates/sdk"]
[workspace.package]
authors = ["Tobie Morgan Hitchcock <tobie@surrealdb.com>"]
edition = "2024"
license-file = "LICENSE"
publish = false
version = "3.0.0"
rust-version = "1.85.0"
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]
# workspace internal dependencies
surrealdb = { version = "=3.0.0", package = "surrealdb", path = "./crates/sdk" }
surrealdb-core = { version = "=3.0.0", package = "surrealdb-core", path = "./crates/core", default-features = false }
# External surreal crates
affinitypool = { version = "0.3.1" }
dmp = "0.2.3"
indxdb = "0.6.0"
ipnet = "2.9.0"
surrealkv = { version = "0.9.1" }
surrealml = { version = "0.1.9", package = "surrealml-core", features = [
"dynamic",
] }
## Somewhat a surreal crate as it is maintained by @Delskayn.
js = { version = "0.9.0", package = "rquickjs" }
lexicmp = "0.2.0"
## Also maintained by @Delskayn
reblessive = "0.4.3"
revision = "0.11.0"
## Maintained by @rushmorem
serde-content = "0.1.0"
storekey = "0.5.0"
trice = "0.4.0"
vart = "0.8.1"
# External Kv stores
foundationdb = { version = "0.9.0", default-features = false, features = [
"embedded-fdb-include",
] }
rocksdb = { version = "0.23.0", features = ["lz4", "snappy"] }
# Managed by surreal but mostly external code
tikv = { version = "0.3.0-surreal.1", default-features = false, package = "surrealdb-tikv-client" }
# Other crates
addr = { version = "0.15.6", default-features = false, features = ["std"] }
ahash = "0.8.11"
ammonia = "4.0.0"
anyhow = "1.0.97"
arbitrary = "1.3.2"
argon2 = "0.5.2"
arrayvec = "0.7.6"
async-channel = "2.3.1"
async-executor = "1.13.1"
async-graphql = { version = "7.0.9", default-features = false }
async-graphql-axum = "=7.0.13"
async-trait = "0.1.88"
base64 = "0.21.5"
bcrypt = "0.15.0"
bincode = "1.3.3"
blake3 = "1.5.3"
bytes = "1.5.0"
castaway = "0.2.3"
cedar-policy = "2.4.2"
chrono = "0.4.38"
ciborium = "0.2.1"
dashmap = "5.5.3"
deunicode = "1.6.1"
ext-sort = "^0.1.4"
fst = "0.4.7"
futures = "0.3.30"
futures-util = "0.3.30"
fuzzy-matcher = "0.3.7"
geo = "0.28.0"
geo-types = "0.7.13"
getrandom = "0.3.2"
hex = "0.4.3"
http = "1.1.0"
indexmap = "2.1.0"
jemallocator = { version = "0.6.0", package = "tikv-jemallocator" }
jsonwebtoken = "9.3.0"
linfa-linalg = "=0.1.0"
md-5 = "0.10.6"
mimalloc = { version = "0.1.43", default-features = false }
nanoid = "0.4.0"
native-tls = "0.2.11"
ndarray = "=0.15.6"
ndarray-stats = "=0.5.1"
num-traits = "0.2.18"
num_cpus = "1.16.0"
object_store = "0.12.0"
parking_lot = "0.12.3"
path-clean = "1.0.1"
pbkdf2 = "0.12.2"
## TODO: Look at dependency, 3 year old, unmaintained, no license specified.
pharos = "0.5.3"
phf = "0.11.2"
pin-project-lite = "0.2.13"
quick_cache = "0.6.12"
# TODO: Look at use of this dependency. Last update was 4 years ago and it is unmaintained
radix_trie = "0.2.1"
rand = "0.8.5"
rayon = "1.10.0"
regex = "1.10.6"
regex-syntax = "0.8.4"
reqwest = { version = "0.12.7", default-features = false }
ring = "0.17.13"
roaring = "0.10.6"
rustls = { version = "0.23.12", default-features = false }
rust_decimal = { version = "1.37.1" }
# Sub dependency of the rustls dependency, should be updated whenever rustls is.
# Defined so we can enable features on this dependency.
rustls-pki-types = "1.7.0"
rust-s3 = "0.35.1"
# TODO: Look at dependency, 5 years old seems unmaintained.
rust-stemmers = "1.2.0"
scrypt = "0.11.0"
semver = "1.0.20"
serde = "1.0.209"
serde_json = "1.0.127"
sha1 = "0.10.6"
sha2 = "0.10.8"
snap = "1.1.0"
strsim = "0.11.1"
subtle = "2.6"
sysinfo = "0.33.0"
tempfile = "3.10.1"
thiserror = "1.0.63"
tokio = { version = "1.44.2", default-features = false }
tokio-stream = "0.1"
tokio-tungstenite = "0.23.1"
tokio-util = "0.7.11"
tracing = "0.1.40"
ulid = "1.1.0"
unicase = "2.7.0"
url = "2.5.0"
uuid = "1.10.0"
wasm-bindgen-futures = "0.4.39"
wasmtimer = { version = "0.2.0", default-features = false }
ws_stream_wasm = "0.7.4"
# used only in dev-dependencies
criterion = "0.5.1"
env_logger = "0.11.7"
flate2 = "1.0.28"
hashbrown = "0.14.5"
pprof = "0.14.0"
rstest = "0.25.0"
serial_test = "2.0.0"
temp-dir = "0.1.11"
test-log = "0.2.13"
time = "0.3.36"
tracing-subscriber = "0.3.18"
wiremock = "0.6.0"
[package]
name = "surreal"
publish = false
edition.workspace = true
version.workspace = true
rust-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]
# Public features
allocation-tracking = ["surrealdb/allocation-tracking"]
allocator = ["surrealdb/allocator"]
default = [
"allocator",
"allocation-tracking",
"storage-mem",
"storage-surrealkv",
"storage-rocksdb",
"scripting",
"http",
]
http = ["surrealdb/http"]
http-compression = []
jwks = ["surrealdb/jwks"]
ml = ["surrealdb/ml"]
performance-profiler = ["dep:pprof"]
scripting = ["surrealdb/scripting"]
storage-mem = ["surrealdb/kv-mem"]
storage-indxdb = ["surrealdb/kv-indxdb"]
storage-rocksdb = ["surrealdb/kv-rocksdb"]
storage-surrealkv = ["surrealdb/kv-surrealkv"]
storage-tikv = ["surrealdb/kv-tikv"]
# FoundationDB features
storage-fdb = ["surrealdb/kv-fdb"]
storage-fdb-7_1 = ["surrealdb/kv-fdb-7_1"]
storage-fdb-7_3 = ["surrealdb/kv-fdb-7_3"]
# Deprecated features
# Doesn't do anything. Use a version specific `storage-fdb-*` feature instead.
enterprise = ["surrealdb-core/enterprise"]
[dependencies]
# workspace internal dependencies
surrealdb = { workspace = true, features = [
"protocol-http",
"protocol-ws",
"rustls",
] }
surrealdb-core.workspace = true
# External surreal crates
revision = { workspace = true, features = [
"chrono",
"geo",
"roaring",
"regex",
"rust_decimal",
"uuid",
] }
# Crates only used by the root surrealdb crate
anyhow.workspace = true
arc-swap = "1.7.1"
axum = { version = "0.7.5", features = ["tracing", "ws"] }
axum-extra = { version = "0.9.3", features = [
"query",
"typed-routing",
"typed-header",
] }
axum-server = { version = "0.7.1", features = ["tls-rustls-no-provider"] }
clap = { version = "4.4.11", features = [
"env",
"derive",
"wrap_help",
"unicode",
] }
glob = "0.3.1"
http-body = "1.0.0"
http-body-util = "0.1.1"
hyper = "1.4.1"
opentelemetry = { version = "0.24" }
opentelemetry-otlp = { version = "0.17.0", features = ["metrics"] }
opentelemetry_sdk = { version = "0.24", features = ["rt-tokio"] }
rustyline = { version = "12.0.0", features = ["derive"] }
tower = { version = "0.4.13", features = ["limit", "load-shed"] }
tower-http = { version = "0.5.2", features = [
"trace",
"sensitive-headers",
"auth",
"request-id",
"util",
"catch-panic",
"cors",
"set-header",
"limit",
"add-extension",
"compression-full",
] }
tower-service = "0.3.3"
tracing-appender = "0.2.3"
tracing-opentelemetry = "0.25.0"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
urlencoding = "2.1.3"
# Other crates
argon2.workspace = true
async-graphql = { workspace = true, default-features = false }
async-graphql-axum.workspace = true
base64.workspace = true
bytes.workspace = true
chrono.workspace = true
ciborium.workspace = true
futures.workspace = true
futures-util.workspace = true
geo.workspace = true
geo-types.workspace = true
http.workspace = true
num_cpus.workspace = true
pin-project-lite.workspace = true
rand.workspace = true
reqwest = { workspace = true, default-features = false, features = [
"blocking",
"gzip",
"http2",
] }
rust_decimal.workspace = true
semver.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
tempfile.workspace = true
thiserror.workspace = true
tokio = { workspace = true, features = ["macros", "signal"] }
tokio-stream.workspace = true
tokio-tungstenite.workspace = true
tokio-util = { workspace = true, features = ["io"] }
tracing.workspace = true
uuid = { workspace = true, features = ["serde", "js", "v4", "v7"] }
# Optional crates
pprof = { workspace = true, features = [
"flamegraph",
"prost-codec",
], optional = true }
[target.'cfg(windows)'.dependencies]
nu-ansi-term = "0.46.0"
[target.'cfg(unix)'.dependencies]
nix = { version = "0.27.1", features = ["user"] }
[target.'cfg(unix)'.dev-dependencies]
nix = { version = "0.27.1", features = ["signal", "user"] }
[dev-dependencies]
# Crates only used by the root surrealdb crate
assert_fs = "1.0.13"
opentelemetry-proto = { version = "0.7.0", features = [
"gen-tonic",
"metrics",
"logs",
] }
rcgen = "0.13.2"
tonic = "0.12.3"
# Other crates
chrono.workspace = true
env_logger.workspace = true
jsonwebtoken.workspace = true
serial_test.workspace = true
test-log = { workspace = true, features = ["trace"] }
ulid.workspace = true
wiremock.workspace = true
rstest.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(kv_fdb)',
'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"
# 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 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 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 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"
# 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