forked from surrealdb/surrealkv
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
188 lines (156 loc) · 8.12 KB
/
Cargo.toml
File metadata and controls
188 lines (156 loc) · 8.12 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
[package]
name = "surrealkv"
publish = true
version = "0.21.0"
edition = "2021"
license = "Apache-2.0"
readme = "README.md"
description = "A low-level, versioned, embedded, ACID-compliant, key-value database for Rust"
repository = "https://github.com/surrealdb/surrealkv"
homepage = "https://github.com/surrealdb/surrealkv"
documentation = "https://docs.rs/surrealkv/"
keywords = ["lmdb", "rocksdb", "sled", "redb", "tikv"]
categories = ["database-implementations", "concurrency", "data-structures"]
rust-version = "1.86"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
integer-encoding = "4.0.0"
arc-swap = "1.7"
snap = "1.0.0"
crc32fast = "1.2.1"
quick_cache = "0.6.16"
parking_lot = "0.12.1"
bytes = "1.11.1"
byteorder = "1.5.0"
rand = "0.9.2"
tokio = { version = "1.36", features = ["rt", "sync", "macros", "time"] }
sha2 = "0.10.8"
async-trait = "0.1.82"
chrono = "0.4.43"
guardian = "1.3.0"
scopeguard = "1.2.0"
log = "0.4.28"
lz4_flex = "0.12"
crossbeam-skiplist = "0.1.3"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
fs2 = "0.4.3"
[target.'cfg(target_family = "wasm")'.dependencies]
getrandom = { version = "0.3.3", features = ["wasm_js"] }
[dev-dependencies]
tempdir = "0.3"
criterion = { version = "0.5.1", features = ["html_reports"] }
tokio = { version = "1.39.2", features = ["full"] }
tempfile = "3.10.1"
fastrand = "2.0.1"
divan = "0.1.14"
test-log = "0.2.18"
proptest = "1.4"
[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 usage of .clone() on a ref-counted pointer, (Rc, Arc, rc::Weak, or sync::Weak),
# and suggests calling Clone via unified function syntax instead (e.g., Rc::clone(foo)).
# https://rust-lang.github.io/rust-clippy/master/#clone_on_ref_ptr
clone_on_ref_ptr = "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"
expl_impl_clone_on_copy = "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 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 `.as_ref().as_ref()` and suggests `.as_ref()` instead.
# Using `.as_ref()` directly is more concise and easier to read.
# https://rust-lang.github.io/rust-clippy/master/#ref_option_ref
ref_option_ref = "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 usage of single-character patterns in match arms.
# Using single-character patterns can make the code more readable and easier to understand.
# https://rust-lang.github.io/rust-clippy/master/#single_char_pattern
single_char_pattern = "warn"
# Checks for trivially copyable types that are passed by reference instead of by value.
# Passing by value is more efficient and avoids unnecessary heap allocations.
# https://rust-lang.github.io/rust-clippy/master/#trivially_copy_pass_by_ref
trivially_copy_pass_by_ref = "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
# TODO(Farhan): This must be changed to `warn`.
unwrap_used = "allow"
[[bench]]
name = "bplustree_bench"
harness = false
[[bench]]
name = "alloc_bench"
harness = false