-
Notifications
You must be signed in to change notification settings - Fork 468
/
Cargo.toml
396 lines (375 loc) · 11.5 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
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
[workspace]
members = [
"src/adapter",
"src/adapter-types",
"src/alloc",
"src/alloc-default",
"src/arrow-util",
"src/audit-log",
"src/avro",
"src/aws-util",
"src/aws-secrets-controller",
"src/balancerd",
"src/build-info",
"src/build-tools",
"src/ccsr",
"src/catalog",
"src/catalog-debug",
"src/cloud-api",
"src/cluster",
"src/clusterd",
"src/cluster-client",
"src/compute",
"src/compute-client",
"src/compute-types",
"src/controller",
"src/controller-types",
"src/durable-cache",
"src/dyncfg",
"src/dyncfg-launchdarkly",
"src/dyncfgs",
"src/environmentd",
"src/expr",
"src/expr-parser",
"src/expr-test-util",
"src/fivetran-destination",
"src/frontegg-auth",
"src/frontegg-client",
"src/frontegg-mock",
"src/http-util",
"src/interchange",
"src/kafka-util",
"src/lowertest",
"src/lowertest-derive",
"src/materialized",
"src/metabase",
"src/mysql-util",
"src/mz",
"src/lsp-server",
"src/materialized",
"src/metrics",
"src/npm",
"src/orchestrator",
"src/orchestrator-kubernetes",
"src/orchestrator-process",
"src/orchestrator-tracing",
"src/orchestratord",
"src/ore",
"src/ore-proc",
"src/persist",
"src/persist-cli",
"src/persist-client",
"src/persist-proc",
"src/txn-wal",
"src/persist-types",
"src/pgcopy",
"src/pgrepr",
"src/pgrepr-consts",
"src/pgtest",
"src/pgtz",
"src/pgwire",
"src/pgwire-common",
"src/postgres-client",
"src/postgres-util",
"src/prof",
"src/prof-http",
"src/proto",
"src/repr",
"src/repr-test-util",
"src/rocksdb",
"src/rocksdb-types",
"src/s3-datagen",
"src/secrets",
"src/segment",
"src/server-core",
"src/service",
"src/ssh-util",
"src/sql",
"src/sql-lexer",
"src/sql-parser",
"src/sql-pretty",
"src/sqllogictest",
"src/storage",
"src/storage-client",
"src/storage-controller",
"src/storage-operators",
"src/storage-types",
"src/testdrive",
"src/timely-util",
"src/timestamp-oracle",
"src/tls-util",
"src/tracing",
"src/transform",
"src/cloud-resources",
"src/walkabout",
"src/workspace-hack",
"test/metabase/smoketest",
"test/test-util",
"src/regexp",
"misc/bazel/cargo-gazelle",
]
# We make all members of the workspace default members, *except* for a few
# specifically chosen exceptions. This is enforced by the linter. See
# misc/python/materialize/cli/lint-cargo.py for the list of exceptions.
#
# Unfortunately Cargo does not provide a more elegant way to express exclusions
# from the workspace's default members.
default-members = [
"misc/bazel/cargo-gazelle",
"src/adapter",
"src/adapter-types",
"src/alloc",
"src/arrow-util",
"src/audit-log",
"src/avro",
"src/aws-secrets-controller",
"src/aws-util",
"src/balancerd",
"src/build-info",
"src/build-tools",
"src/catalog",
"src/catalog-debug",
"src/ccsr",
"src/cloud-api",
"src/cloud-resources",
"src/cluster",
"src/cluster-client",
"src/clusterd",
"src/compute",
"src/compute-client",
"src/compute-types",
"src/controller",
"src/controller-types",
"src/durable-cache",
"src/dyncfg",
"src/dyncfg-launchdarkly",
"src/dyncfgs",
"src/environmentd",
"src/expr",
"src/expr-parser",
"src/expr-test-util",
"src/frontegg-auth",
"src/frontegg-client",
"src/frontegg-mock",
"src/http-util",
"src/interchange",
"src/kafka-util",
"src/lowertest",
"src/lowertest-derive",
"src/lsp-server",
"src/materialized",
"src/metabase",
"src/metrics",
"src/mysql-util",
"src/mz",
"src/npm",
"src/orchestrator",
"src/orchestrator-kubernetes",
"src/orchestrator-process",
"src/orchestrator-tracing",
"src/orchestratord",
"src/ore",
"src/ore-proc",
"src/persist",
"src/persist-cli",
"src/persist-client",
"src/persist-proc",
"src/persist-types",
"src/pgcopy",
"src/pgrepr",
"src/pgrepr-consts",
"src/pgtest",
"src/pgtz",
"src/pgwire",
"src/pgwire-common",
"src/postgres-client",
"src/postgres-util",
"src/prof",
"src/prof-http",
"src/proto",
"src/regexp",
"src/repr",
"src/repr-test-util",
"src/rocksdb",
"src/rocksdb-types",
"src/s3-datagen",
"src/secrets",
"src/segment",
"src/server-core",
"src/service",
"src/sql",
"src/sql-lexer",
"src/sql-parser",
"src/sql-pretty",
"src/sqllogictest",
"src/ssh-util",
"src/storage",
"src/storage-client",
"src/storage-controller",
"src/storage-operators",
"src/storage-types",
"src/testdrive",
"src/timely-util",
"src/timestamp-oracle",
"src/tls-util",
"src/tracing",
"src/transform",
"src/txn-wal",
"src/walkabout",
"src/workspace-hack",
"test/metabase/smoketest",
"test/test-util",
]
exclude = [
# All WASM crates are split into their own workspace to avoid needles cache
# invalidations for the core Mz crates.
"misc/wasm/*",
]
# Use Cargo's new feature resolver, which can handle target-specific features.
# Explicit opt-in is required even with the 2021 edition because we use a
# virtual workspace.
# See: https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver
resolver = "2"
[workspace.package]
edition = "2021"
rust-version = "1.80.1"
[profile.dev]
split-debuginfo = "unpacked"
[profile.dev.package]
# Compile the backtrace crate and its dependencies with all optimizations, even
# in dev builds, since otherwise backtraces can take 20s+ to symbolize. With
# optimizations enabled, symbolizing a backtrace takes less than 1s.
addr2line = { opt-level = 3 }
adler = { opt-level = 3 }
backtrace = { opt-level = 3 }
gimli = { opt-level = 3 }
miniz_oxide = { opt-level = 3 }
object = { opt-level = 3 }
rustc-demangle = { opt-level = 3 }
[profile.release]
# Compile time seems similar to "lto = false", runtime ~10% faster
lto = "thin"
# Emit full debug info, allowing us to easily analyze core dumps from
# staging (and, in an emergency, also prod).
#
# This does not negatively impact the sizes of the main binaries
# (clusterd and environmentd), since we split the debuginfo from those
# and ship it separately to an s3 bucket before building their
# docker containers.
debug = 2
# IMPORTANT: when patching a dependency, you should only depend on "main",
# "master", or an upstream release branch (e.g., "v7.x"). Do *not* depend on a
# feature/patch branch (e.g., "fix-thing" or "pr-1234"). Feature/patch branches
# tend to get rewritten or disappear (e.g., because a PR is force pushed or gets
# merged), after which point it becomes impossible to build that historical
# version of Materialize.
[patch.crates-io]
# Waiting on https://github.com/sfackler/rust-postgres/pull/752.
postgres = { git = "https://github.com/MaterializeInc/rust-postgres" }
tokio-postgres = { git = "https://github.com/MaterializeInc/rust-postgres" }
postgres-protocol = { git = "https://github.com/MaterializeInc/rust-postgres" }
postgres-replication = { git = "https://github.com/MaterializeInc/rust-postgres" }
postgres-types = { git = "https://github.com/MaterializeInc/rust-postgres" }
postgres-openssl = { git = "https://github.com/MaterializeInc/rust-postgres" }
postgres_array = { git = "https://github.com/MaterializeInc/rust-postgres-array" }
# Waiting on a release that includes:
# * https://github.com/blackbeam/mysql_async/pull/300
# * https://github.com/blackbeam/mysql_async/pull/307
mysql_async = { git = "https://github.com/MaterializeInc/mysql_async" }
# Waiting on https://github.com/MaterializeInc/serde-value/pull/35.
serde-value = { git = "https://github.com/MaterializeInc/serde-value.git" }
# Waiting on https://github.com/MaterializeInc/tracing/pull/1 to be submitted
# upstream.
tracing-opentelemetry = { git = "https://github.com/MaterializeInc/tracing-opentelemetry.git" }
# Waiting on https://github.com/launchdarkly/rust-server-sdk/pull/20 to make
# it into a release.
# Also bumps lru to 0.12.0
# Needs a more complex update to 2.0.0, with a custom TLS connector.
launchdarkly-server-sdk = { git = "https://github.com/MaterializeInc/rust-server-sdk", rev = "87c0f67aa51fa936d3a6a49605e8e3f565d15281" }
# Waiting on https://github.com/AltSysrq/proptest/pull/264.
proptest = { git = "https://github.com/MaterializeInc/proptest.git" }
proptest-derive = { git = "https://github.com/MaterializeInc/proptest.git" }
# Waiting on https://github.com/edenhill/librdkafka/pull/4051.
rdkafka = { git = "https://github.com/MaterializeInc/rust-rdkafka.git" }
rdkafka-sys = { git = "https://github.com/MaterializeInc/rust-rdkafka.git" }
# Waiting on https://github.com/openssh-rust/openssh/pull/120 to make it into
# a release.
openssh = { git = "https://github.com/MaterializeInc/openssh.git" }
# Removes dependencies required for WASM support that create duplicated deps.
reqwest-middleware = { git = "https://github.com/MaterializeInc/reqwest-middleware.git" }
reqwest-retry = { git = "https://github.com/MaterializeInc/reqwest-middleware.git" }
[workspace.metadata.vet]
store = { path = "misc/cargo-vet" }
# BEGIN LINT CONFIG
# DO NOT EDIT. Automatically generated by bin/gen-lints.
[workspace.lints.rust]
unknown_lints = "allow"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(bazel, stamped, coverage, nightly_doc_features, release, tokio_unstable)'] }
[workspace.lints.rustdoc]
unportable_markdown = "allow"
[workspace.lints.clippy]
style = { level = "allow", priority = -1 }
complexity = { level = "allow", priority = -1 }
large_enum_variant = { level = "allow", priority = 0 }
mutable_key_type = { level = "allow", priority = 0 }
stable_sort_primitive = { level = "allow", priority = 0 }
map_entry = { level = "allow", priority = 0 }
box_default = { level = "allow", priority = 0 }
drain_collect = { level = "allow", priority = 0 }
bool_comparison = "warn"
clone_on_ref_ptr = "warn"
no_effect = "warn"
unnecessary_unwrap = "warn"
dbg_macro = "warn"
todo = "warn"
wildcard_dependencies = "warn"
zero_prefixed_literal = "warn"
borrowed_box = "warn"
deref_addrof = "warn"
double_must_use = "warn"
double_parens = "warn"
extra_unused_lifetimes = "warn"
needless_borrow = "warn"
needless_question_mark = "warn"
needless_return = "warn"
redundant_pattern = "warn"
redundant_slicing = "warn"
redundant_static_lifetimes = "warn"
single_component_path_imports = "warn"
unnecessary_cast = "warn"
useless_asref = "warn"
useless_conversion = "warn"
builtin_type_shadow = "warn"
duplicate_underscore_argument = "warn"
double_neg = "warn"
unnecessary_mut_passed = "warn"
wildcard_in_or_patterns = "warn"
crosspointer_transmute = "warn"
excessive_precision = "warn"
panicking_overflow_checks = "warn"
as_conversions = "warn"
match_overlapping_arm = "warn"
zero_divided_by_zero = "warn"
must_use_unit = "warn"
suspicious_assignment_formatting = "warn"
suspicious_else_formatting = "warn"
suspicious_unary_op_formatting = "warn"
mut_mutex_lock = "warn"
print_literal = "warn"
same_item_push = "warn"
useless_format = "warn"
write_literal = "warn"
redundant_closure = "warn"
redundant_closure_call = "warn"
unnecessary_lazy_evaluations = "warn"
partialeq_ne_impl = "warn"
redundant_field_names = "warn"
transmutes_expressible_as_ptr_casts = "warn"
unused_async = "warn"
disallowed_methods = "warn"
disallowed_macros = "warn"
disallowed_types = "warn"
from_over_into = "warn"
mod_module_files = "warn"
needless_pass_by_ref_mut = "warn"
# END LINT CONFIG