Cargo.toml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. [workspace]
  2. members = [
  3. "misc/bazel/cargo-gazelle",
  4. "src/adapter",
  5. "src/adapter-types",
  6. "src/alloc",
  7. "src/alloc-default",
  8. "src/arrow-util",
  9. "src/audit-log",
  10. "src/auth",
  11. "src/authenticator",
  12. "src/avro",
  13. "src/aws-secrets-controller",
  14. "src/aws-util",
  15. "src/balancerd",
  16. "src/build-info",
  17. "src/build-tools",
  18. "src/catalog",
  19. "src/catalog-debug",
  20. "src/catalog-protos",
  21. "src/ccsr",
  22. "src/cloud-api",
  23. "src/cloud-provider",
  24. "src/cloud-resources",
  25. "src/cluster",
  26. "src/cluster-client",
  27. "src/clusterd",
  28. "src/compute",
  29. "src/compute-client",
  30. "src/compute-types",
  31. "src/controller",
  32. "src/controller-types",
  33. "src/durable-cache",
  34. "src/dyncfg",
  35. "src/dyncfg-launchdarkly",
  36. "src/dyncfg-file",
  37. "src/dyncfgs",
  38. "src/environmentd",
  39. "src/expr",
  40. "src/expr-derive",
  41. "src/expr-derive-impl",
  42. "src/expr-parser",
  43. "src/expr-test-util",
  44. "src/fivetran-destination",
  45. "src/frontegg-auth",
  46. "src/frontegg-client",
  47. "src/frontegg-mock",
  48. "src/http-util",
  49. "src/interchange",
  50. "src/kafka-util",
  51. "src/license-keys",
  52. "src/lowertest",
  53. "src/lowertest-derive",
  54. "src/lsp-server",
  55. "src/materialized",
  56. "src/materialized",
  57. "src/metabase",
  58. "src/metrics",
  59. "src/mysql-util",
  60. "src/mz",
  61. "src/mz-debug",
  62. "src/npm",
  63. "src/orchestrator",
  64. "src/orchestrator-kubernetes",
  65. "src/orchestrator-process",
  66. "src/orchestrator-tracing",
  67. "src/orchestratord",
  68. "src/ore",
  69. "src/ore-build",
  70. "src/ore-proc",
  71. "src/persist",
  72. "src/persist-cli",
  73. "src/persist-client",
  74. "src/persist-proc",
  75. "src/persist-types",
  76. "src/pgcopy",
  77. "src/pgrepr",
  78. "src/pgrepr-consts",
  79. "src/pgtest",
  80. "src/pgtz",
  81. "src/pgwire",
  82. "src/pgwire-common",
  83. "src/postgres-client",
  84. "src/postgres-util",
  85. "src/prof",
  86. "src/prof-http",
  87. "src/proto",
  88. "src/regexp",
  89. "src/repr",
  90. "src/repr-test-util",
  91. "src/rocksdb",
  92. "src/rocksdb-types",
  93. "src/s3-datagen",
  94. "src/secrets",
  95. "src/segment",
  96. "src/server-core",
  97. "src/service",
  98. "src/sql",
  99. "src/sql-lexer",
  100. "src/sql-parser",
  101. "src/sql-pretty",
  102. "src/sql-server-util",
  103. "src/sqllogictest",
  104. "src/ssh-util",
  105. "src/storage",
  106. "src/storage-client",
  107. "src/storage-controller",
  108. "src/storage-operators",
  109. "src/storage-types",
  110. "src/testdrive",
  111. "src/timely-util",
  112. "src/timestamp-oracle",
  113. "src/tls-util",
  114. "src/tracing",
  115. "src/transform",
  116. "src/txn-wal",
  117. "src/walkabout",
  118. "src/workspace-hack",
  119. "test/metabase/smoketest",
  120. "test/test-util",
  121. ]
  122. # We make all members of the workspace default members, *except* for a few
  123. # specifically chosen exceptions. This is enforced by the linter. See
  124. # misc/python/materialize/cli/lint-cargo.py for the list of exceptions.
  125. #
  126. # Unfortunately Cargo does not provide a more elegant way to express exclusions
  127. # from the workspace's default members.
  128. default-members = [
  129. "misc/bazel/cargo-gazelle",
  130. "src/adapter",
  131. "src/adapter-types",
  132. "src/alloc",
  133. "src/arrow-util",
  134. "src/audit-log",
  135. "src/auth",
  136. "src/authenticator",
  137. "src/avro",
  138. "src/aws-secrets-controller",
  139. "src/aws-util",
  140. "src/balancerd",
  141. "src/build-info",
  142. "src/build-tools",
  143. "src/catalog",
  144. "src/catalog-debug",
  145. "src/catalog-protos",
  146. "src/ccsr",
  147. "src/cloud-api",
  148. "src/cloud-provider",
  149. "src/cloud-resources",
  150. "src/cluster",
  151. "src/cluster-client",
  152. "src/clusterd",
  153. "src/compute",
  154. "src/compute-client",
  155. "src/compute-types",
  156. "src/controller",
  157. "src/controller-types",
  158. "src/durable-cache",
  159. "src/dyncfg",
  160. "src/dyncfg-launchdarkly",
  161. "src/dyncfg-file",
  162. "src/dyncfgs",
  163. "src/environmentd",
  164. "src/expr",
  165. "src/expr-derive",
  166. "src/expr-derive-impl",
  167. "src/expr-parser",
  168. "src/expr-test-util",
  169. "src/frontegg-auth",
  170. "src/frontegg-client",
  171. "src/frontegg-mock",
  172. "src/http-util",
  173. "src/interchange",
  174. "src/kafka-util",
  175. "src/license-keys",
  176. "src/lowertest",
  177. "src/lowertest-derive",
  178. "src/lsp-server",
  179. "src/materialized",
  180. "src/metabase",
  181. "src/metrics",
  182. "src/mysql-util",
  183. "src/mz",
  184. "src/mz-debug",
  185. "src/npm",
  186. "src/orchestrator",
  187. "src/orchestrator-kubernetes",
  188. "src/orchestrator-process",
  189. "src/orchestrator-tracing",
  190. "src/orchestratord",
  191. "src/ore",
  192. "src/ore-build",
  193. "src/ore-proc",
  194. "src/persist",
  195. "src/persist-cli",
  196. "src/persist-client",
  197. "src/persist-proc",
  198. "src/persist-types",
  199. "src/pgcopy",
  200. "src/pgrepr",
  201. "src/pgrepr-consts",
  202. "src/pgtest",
  203. "src/pgtz",
  204. "src/pgwire",
  205. "src/pgwire-common",
  206. "src/postgres-client",
  207. "src/postgres-util",
  208. "src/prof",
  209. "src/prof-http",
  210. "src/proto",
  211. "src/regexp",
  212. "src/repr",
  213. "src/repr-test-util",
  214. "src/rocksdb",
  215. "src/rocksdb-types",
  216. "src/s3-datagen",
  217. "src/secrets",
  218. "src/segment",
  219. "src/server-core",
  220. "src/service",
  221. "src/sql",
  222. "src/sql-lexer",
  223. "src/sql-parser",
  224. "src/sql-pretty",
  225. "src/sql-server-util",
  226. "src/sqllogictest",
  227. "src/ssh-util",
  228. "src/storage",
  229. "src/storage-client",
  230. "src/storage-controller",
  231. "src/storage-operators",
  232. "src/storage-types",
  233. "src/testdrive",
  234. "src/timely-util",
  235. "src/timestamp-oracle",
  236. "src/tls-util",
  237. "src/tracing",
  238. "src/transform",
  239. "src/txn-wal",
  240. "src/walkabout",
  241. "src/workspace-hack",
  242. "test/metabase/smoketest",
  243. "test/test-util",
  244. ]
  245. exclude = [
  246. # All WASM crates are split into their own workspace to avoid needles cache
  247. # invalidations for the core Mz crates.
  248. "misc/wasm/*",
  249. # Ignore any Rust dependencies that python packages might pull in.
  250. "misc/python/venv/*",
  251. ]
  252. # Use Cargo's new feature resolver, which can handle target-specific features.
  253. # Explicit opt-in is required even with the 2021 edition because we use a
  254. # virtual workspace.
  255. # See: https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver
  256. resolver = "2"
  257. [workspace.package]
  258. edition = "2024"
  259. rust-version = "1.88.0"
  260. [profile.dev]
  261. split-debuginfo = "unpacked"
  262. [profile.dev.package]
  263. # Compile the backtrace crate and its dependencies with all optimizations, even
  264. # in dev builds, since otherwise backtraces can take 20s+ to symbolize. With
  265. # optimizations enabled, symbolizing a backtrace takes less than 1s.
  266. addr2line = { opt-level = 3 }
  267. adler2 = { opt-level = 3 }
  268. backtrace = { opt-level = 3 }
  269. gimli = { opt-level = 3 }
  270. miniz_oxide = { opt-level = 3 }
  271. object = { opt-level = 3 }
  272. rustc-demangle = { opt-level = 3 }
  273. timely = { opt-level = 3 }
  274. differential-dataflow = { opt-level = 3 }
  275. mz-compute = { opt-level = 3 }
  276. mz-transform = { opt-level = 3 }
  277. # Recommended by insta
  278. insta = { opt-level = 3 }
  279. similar = { opt-level = 3 }
  280. [profile.release]
  281. # Compile time seems similar to "lto = false", runtime ~10% faster
  282. lto = "thin"
  283. # Emit full debug info, allowing us to easily analyze core dumps from
  284. # staging (and, in an emergency, also prod).
  285. #
  286. # This does not negatively impact the sizes of the main binaries
  287. # (clusterd and environmentd), since we split the debuginfo from those
  288. # and ship it separately to an s3 bucket before building their
  289. # docker containers.
  290. debug = 2
  291. [profile.optimized]
  292. inherits = "release"
  293. lto = "off"
  294. debug = 1
  295. incremental = true
  296. [profile.ci]
  297. inherits = "optimized"
  298. debug = "line-tables-only"
  299. debug-assertions = true
  300. # IMPORTANT: when patching a dependency, you should only depend on "main",
  301. # "master", or an upstream release branch (e.g., "v7.x"). Do *not* depend on a
  302. # feature/patch branch (e.g., "fix-thing" or "pr-1234"). Feature/patch branches
  303. # tend to get rewritten or disappear (e.g., because a PR is force pushed or gets
  304. # merged), after which point it becomes impossible to build that historical
  305. # version of Materialize.
  306. [patch.crates-io]
  307. # Waiting on https://github.com/sfackler/rust-postgres/pull/752.
  308. postgres = { git = "https://github.com/MaterializeInc/rust-postgres" }
  309. tokio-postgres = { git = "https://github.com/MaterializeInc/rust-postgres" }
  310. postgres-protocol = { git = "https://github.com/MaterializeInc/rust-postgres" }
  311. postgres-replication = { git = "https://github.com/MaterializeInc/rust-postgres" }
  312. postgres-types = { git = "https://github.com/MaterializeInc/rust-postgres" }
  313. postgres-openssl = { git = "https://github.com/MaterializeInc/rust-postgres" }
  314. postgres_array = { git = "https://github.com/MaterializeInc/rust-postgres-array" }
  315. # Waiting on https://github.com/MaterializeInc/serde-value/pull/35.
  316. serde-value = { git = "https://github.com/MaterializeInc/serde-value.git" }
  317. # Waiting on https://github.com/MaterializeInc/tracing/pull/1 to be submitted
  318. # upstream.
  319. tracing-opentelemetry = { git = "https://github.com/MaterializeInc/tracing-opentelemetry.git" }
  320. # Waiting for resolution of https://github.com/launchdarkly/rust-server-sdk/issues/116
  321. launchdarkly-server-sdk = { git = "https://github.com/MaterializeInc/rust-server-sdk", rev = "23666d095c39adc53a151969c1aa1e1ec484f3e6" }
  322. # Waiting on https://github.com/edenhill/librdkafka/pull/4051.
  323. rdkafka = { git = "https://github.com/MaterializeInc/rust-rdkafka.git" }
  324. rdkafka-sys = { git = "https://github.com/MaterializeInc/rust-rdkafka.git" }
  325. # Removes dependencies required for WASM support that create duplicated deps.
  326. reqwest-middleware = { git = "https://github.com/MaterializeInc/reqwest-middleware.git" }
  327. reqwest-retry = { git = "https://github.com/MaterializeInc/reqwest-middleware.git" }
  328. # Need to upstream a few PRs related to test builders.
  329. #
  330. # Note: All changes in our fork of tiberius should be pushed to the `mz_changes` branch.
  331. tiberius = { git = "https://github.com/MaterializeInc/tiberius", rev="64ca594cc22ed67d072c2d0110455da50539e1cd" }
  332. # BEGIN LINT CONFIG
  333. # DO NOT EDIT. Automatically generated by bin/gen-lints.
  334. [workspace.lints.rust]
  335. unknown_lints = "allow"
  336. non_local_definitions = "allow"
  337. unexpected_cfgs = { level = "warn", check-cfg = ['cfg(bazel, stamped, coverage, nightly_doc_features, release, tokio_unstable)'] }
  338. [workspace.lints.rustdoc]
  339. [workspace.lints.clippy]
  340. style = { level = "allow", priority = -1 }
  341. complexity = { level = "allow", priority = -1 }
  342. large_enum_variant = { level = "allow", priority = 0 }
  343. result_large_err = { level = "allow", priority = 0 }
  344. mutable_key_type = { level = "allow", priority = 0 }
  345. stable_sort_primitive = { level = "allow", priority = 0 }
  346. map_entry = { level = "allow", priority = 0 }
  347. box_default = { level = "allow", priority = 0 }
  348. drain_collect = { level = "allow", priority = 0 }
  349. bool_comparison = "warn"
  350. clone_on_ref_ptr = "warn"
  351. no_effect = "warn"
  352. unnecessary_unwrap = "warn"
  353. dbg_macro = "warn"
  354. todo = "warn"
  355. zero_prefixed_literal = "warn"
  356. borrowed_box = "warn"
  357. deref_addrof = "warn"
  358. double_must_use = "warn"
  359. double_parens = "warn"
  360. extra_unused_lifetimes = "warn"
  361. needless_borrow = "warn"
  362. needless_question_mark = "warn"
  363. needless_return = "warn"
  364. redundant_pattern = "warn"
  365. redundant_slicing = "warn"
  366. redundant_static_lifetimes = "warn"
  367. single_component_path_imports = "warn"
  368. unnecessary_cast = "warn"
  369. useless_asref = "warn"
  370. useless_conversion = "warn"
  371. builtin_type_shadow = "warn"
  372. duplicate_underscore_argument = "warn"
  373. double_negations = "warn"
  374. unnecessary_mut_passed = "warn"
  375. wildcard_in_or_patterns = "warn"
  376. crosspointer_transmute = "warn"
  377. excessive_precision = "warn"
  378. panicking_overflow_checks = "warn"
  379. as_conversions = "warn"
  380. match_overlapping_arm = "warn"
  381. zero_divided_by_zero = "warn"
  382. must_use_unit = "warn"
  383. suspicious_assignment_formatting = "warn"
  384. suspicious_else_formatting = "warn"
  385. suspicious_unary_op_formatting = "warn"
  386. mut_mutex_lock = "warn"
  387. print_literal = "warn"
  388. same_item_push = "warn"
  389. useless_format = "warn"
  390. write_literal = "warn"
  391. redundant_closure = "warn"
  392. redundant_closure_call = "warn"
  393. unnecessary_lazy_evaluations = "warn"
  394. partialeq_ne_impl = "warn"
  395. redundant_field_names = "warn"
  396. transmutes_expressible_as_ptr_casts = "warn"
  397. unused_async = "warn"
  398. disallowed_methods = "warn"
  399. disallowed_macros = "warn"
  400. disallowed_types = "warn"
  401. from_over_into = "warn"
  402. mod_module_files = "warn"
  403. needless_pass_by_ref_mut = "warn"
  404. borrow_interior_mutable_const = "warn"
  405. or_fun_call = "warn"
  406. # END LINT CONFIG