-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
304 lines (289 loc) · 11 KB
/
Cargo.toml
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
[package]
name = "tikv"
version = "5.4.0-alpha"
authors = ["The TiKV Authors"]
description = "A distributed transactional key-value database powered by Rust and Raft"
license = "Apache-2.0"
keywords = ["KV", "distributed-systems", "raft"]
homepage = "https://tikv.org"
repository = "https://github.com/tikv/tikv/"
readme = "README.md"
edition = "2018"
publish = false
[features]
default = ["test-engines-rocksdb", "cloud-aws", "cloud-gcp"]
tcmalloc = ["tikv_alloc/tcmalloc"]
jemalloc = ["tikv_alloc/jemalloc", "engine_rocks/jemalloc"]
mimalloc = ["tikv_alloc/mimalloc"]
snmalloc = ["tikv_alloc/snmalloc"]
portable = ["engine_rocks/portable"]
sse = ["engine_rocks/sse"]
mem-profiling = ["tikv_alloc/mem-profiling"]
failpoints = [
"fail/failpoints",
"raftstore/failpoints",
"tikv_util/failpoints",
"engine_rocks/failpoints"
]
cloud-aws = [
"encryption_export/cloud-aws",
"sst_importer/cloud-aws",
]
cloud-gcp = [
"encryption_export/cloud-gcp",
"sst_importer/cloud-gcp",
]
testexport = ["raftstore/testexport"]
test-engines-rocksdb = [
"engine_test/test-engines-rocksdb",
]
test-engines-panic = [
"engine_test/test-engines-panic",
]
bcc-iosnoop = [
"file_system/bcc-iosnoop",
]
cloud-storage-grpc = ["sst_importer/cloud-storage-grpc"]
cloud-storage-dylib = ["sst_importer/cloud-storage-dylib"]
# for testing configure propegate to other crates
# https://stackoverflow.com/questions/41700543/can-we-share-test-utilites-between-crates
testing = []
[lib]
name = "tikv"
[dependencies]
anyhow = "1.0"
async-stream = "0.2"
async-trait = "0.1"
backtrace = "0.3"
batch-system = { path = "components/batch-system", default-features = false }
byteorder = "1.2"
chrono = "0.4"
codec = { path = "components/codec", default-features = false }
concurrency_manager = { path = "components/concurrency_manager", default-features = false }
online_config = { path = "components/online_config" }
crc32fast = "1.2"
crc64fast = "0.1"
crossbeam = "0.8"
encryption_export = { path = "components/encryption/export", default-features = false }
engine_panic = { path = "components/engine_panic", default-features = false }
engine_rocks = { path = "components/engine_rocks", default-features = false }
engine_test = { path = "components/engine_test", default-features = false }
engine_traits = { path = "components/engine_traits", default-features = false }
engine_traits_tests = { path = "components/engine_traits_tests", default-features = false }
error_code = { path = "components/error_code", default-features = false }
fail = "0.5"
file_system = { path = "components/file_system", default-features = false }
fs2 = "0.4"
futures = { version = "0.3", features = ["thread-pool", "compat"] }
futures-executor = "0.3.1"
futures-util = { version = "0.3.1", default-features = false, features = ["io", "async-await"] }
grpcio = { version = "0.9", default-features = false, features = ["openssl-vendored", "protobuf-codec"] }
grpcio-health = { version = "0.9", default-features = false, features = ["protobuf-codec"] }
hex = "0.4"
hyper-tls = "0.5"
itertools = "0.10"
openssl = "0.10"
hyper = { version = "0.14", features = ["full"] }
hyper-openssl = "0.9"
http = "0"
into_other = { path = "components/into_other", default-features = false }
keys = { path = "components/keys", default-features = false }
kvproto = { git = "https://github.com/pingcap/kvproto.git" }
lazy_static = "1.3"
libc = "0.2"
libloading = "0.7"
log = { version = "0.4", features = ["max_level_trace", "release_max_level_debug"] }
log_wrappers = { path = "components/log_wrappers" }
memory_trace_macros = { path = "components/memory_trace_macros" }
mime = "0.3.13"
more-asserts = "0.2"
murmur3 = "0.5.1"
nom = { version = "5.1.0", default-features = false, features = ["std"] }
notify = "4"
num_cpus = "1"
pd_client = { path = "components/pd_client", default-features = false }
case_macros = {path = "components/case_macros"}
pin-project = "1.0"
pnet_datalink = "0.23"
pprof = { version = "^0.6", default-features = false, features = ["flamegraph", "protobuf"] }
protobuf = { version = "2.8", features = ["bytes"] }
raft = { version = "0.6.0-alpha", default-features = false, features = ["protobuf-codec"] }
raftstore = { path = "components/raftstore", default-features = false }
raft_log_engine = { path = "components/raft_log_engine", default-features = false }
rand = "0.7.3"
regex = "1.3"
num-traits = "0.2.14"
rev_lines = "0.2.1"
security = { path = "components/security", default-features = false }
semver = "0.11"
serde = { version = "1.0", features = ["derive"] }
serde_derive = "1.0"
serde_ignored = "0.1"
serde_json = "1.0"
slog = { version = "2.3", features = ["max_level_trace", "release_max_level_debug"] }
slog-global = { version = "0.1", git = "https://github.com/breeswish/slog-global.git", rev = "d592f88e4dbba5eb439998463054f1a44fbf17b9" }
strum = { version = "0.20", features = ["derive"] }
parking_lot = "0.11"
prometheus = { version = "0.13", features = ["nightly"] }
prometheus-static-metric = "0.5"
sst_importer = { path = "components/sst_importer", default-features = false }
sysinfo = "0.16"
tempfile = "3.0"
match_template = { path = "components/match_template" }
paste = "1.0"
thiserror = "1.0"
tidb_query_datatype = { path = "components/tidb_query_datatype", default-features = false }
tidb_query_common = { path = "components/tidb_query_common", default-features = false }
tidb_query_expr = { path = "components/tidb_query_expr", default-features = false }
tidb_query_aggr = { path = "components/tidb_query_aggr", default-features = false }
tidb_query_executors = { path = "components/tidb_query_executors", default-features = false }
tikv_alloc = { path = "components/tikv_alloc" }
tikv_kv = { path = "components/tikv_kv", default-features = false }
tikv_util = { path = "components/tikv_util", default-features = false }
collections = { path = "components/collections" }
coprocessor_plugin_api = { path = "components/coprocessor_plugin_api" }
time = "0.1"
tipb = { git = "https://github.com/pingcap/tipb.git" }
tokio = { version = "1.12", features = ["full"] }
tokio-timer = "0.2"
tokio-openssl = "0.6"
toml = "0.5"
txn_types = { path = "components/txn_types", default-features = false }
url = "2"
uuid = { version = "0.8.1", features = ["serde", "v4"] }
walkdir = "2"
yatp = { git = "https://github.com/tikv/yatp.git", branch = "master" }
resource_metering = { path = "components/resource_metering" }
seahash = "4.1.0"
[dev-dependencies]
example_plugin = { path = "components/test_coprocessor_plugin/example_plugin" } # should be a binary dependency
panic_hook = { path = "components/panic_hook" }
reqwest = { version = "0.11", features = ["blocking"] }
test_sst_importer = { path = "components/test_sst_importer", default-features = false }
test_util = { path = "components/test_util", default-features = false }
tokio = { version = "1.5", features = ["macros", "rt-multi-thread", "time"] }
zipf = "6.1.0"
[patch.crates-io]
# TODO: remove this when new raft-rs is published.
raft = { git = "https://github.com/tikv/raft-rs", branch = "master" }
raft-proto = { git = "https://github.com/tikv/raft-rs", branch = "master" }
protobuf = { git = "https://github.com/pingcap/rust-protobuf", branch = "v2.8" }
protobuf-codegen = { git = "https://github.com/pingcap/rust-protobuf", branch = "v2.8" }
# TODO: remove this replacement after rusoto_s3 truly supports virtual-host style (https://github.com/rusoto/rusoto/pull/1823).
rusoto_core = { git = "https://github.com/tikv/rusoto", branch = "gh1482-s3-addr-styles" }
rusoto_credential = { git = "https://github.com/tikv/rusoto", branch = "gh1482-s3-addr-styles" }
rusoto_kms = { git = "https://github.com/tikv/rusoto", branch = "gh1482-s3-addr-styles" }
rusoto_mock = { git = "https://github.com/tikv/rusoto", branch = "gh1482-s3-addr-styles" }
rusoto_s3 = { git = "https://github.com/tikv/rusoto", branch = "gh1482-s3-addr-styles" }
rusoto_sts = { git = "https://github.com/tikv/rusoto", branch = "gh1482-s3-addr-styles" }
[target.'cfg(target_os = "linux")'.dependencies]
procinfo = { git = "https://github.com/tikv/procinfo-rs", rev = "5125fc1a69496b73b26b3c08b6e8afc3c665a56e" }
# When you modify TiKV cooperatively with kvproto, this will be useful to submit the PR to TiKV and the PR to
# kvproto at the same time.
# After the PR to kvproto is merged, remember to comment this out and run `cargo update -p kvproto`.
# [patch.'https://github.com/pingcap/kvproto']
# kvproto = {git = "https://github.com/your_github_id/kvproto", branch="your_branch"}
[workspace]
# See https://github.com/rust-lang/rfcs/blob/master/text/2957-cargo-features2.md
# Without resolver = 2, using `cargo build --features x` to build `cmd`
# will _not_ propagate the feature `x` into `cmd`'s direct dependencies.
resolver = "2"
members = [
"fuzz",
"fuzz/fuzzer-afl",
"fuzz/fuzzer-libfuzzer",
"fuzz/fuzzer-honggfuzz",
"tests",
"cmd/tikv-server",
"cmd/tikv-ctl",
"components/test_backup",
"components/test_raftstore",
"components/test_storage",
"components/test_coprocessor",
"components/test_sst_importer",
"components/test_util",
"components/test_pd",
"components/tikv_alloc",
"components/match_template",
"components/codec",
"components/online_config",
"components/panic_hook",
"components/tipb_helper",
"components/log_wrappers",
"components/tikv_util",
"components/tidb_query_datatype",
"components/tidb_query_common",
"components/tidb_query_codegen",
"components/tidb_query_expr",
"components/tidb_query_aggr",
"components/tidb_query_executors",
"components/pd_client",
"components/external_storage",
"components/external_storage/export",
"components/case_macros",
"components/cloud",
"components/cloud/aws",
"components/cloud/gcp",
"components/backup",
"components/keys",
"components/sst_importer",
"components/txn_types",
"components/resolved_ts",
"components/batch-system",
"components/cdc",
"components/raftstore",
"components/into_other",
"components/encryption",
"components/encryption/export",
"components/error_code",
"components/concurrency_manager",
"components/server",
"components/file_system",
"components/collections",
"components/coprocessor_plugin_api",
"components/test_coprocessor_plugin/example_plugin",
"components/resource_metering",
]
default-members = ["cmd/tikv-server", "cmd/tikv-ctl"]
[profile.dev]
opt-level = 0
debug = 1 # required for line numbers in tests, see tikv #5049
codegen-units = 4
lto = false
incremental = true
panic = 'unwind'
debug-assertions = true
overflow-checks = false
rpath = false
[profile.release]
opt-level = 3
debug = false
codegen-units = 1
lto = "thin"
incremental = false
panic = 'unwind'
debug-assertions = false
overflow-checks = false
rpath = false
[profile.release.package.server]
opt-level = 1
codegen-units = 4
[profile.test]
opt-level = 0
debug = 1 # enable line numbers by default for easy test debugging
codegen-units = 16
lto = false
incremental = true
debug-assertions = true
overflow-checks = true
rpath = false
# The benchmark profile is identical to release, except that lto = false
[profile.bench]
opt-level = 3
debug = false
codegen-units = 1
lto = 'thin'
incremental = false
debug-assertions = false
overflow-checks = false
rpath = false