@@ -179,13 +179,56 @@ testcontainers-modules = { version = "0.12" }
179179tokio = { version = " 1.47" , features = [" macros" , " rt" , " sync" ] }
180180url = " 2.5.7"
181181
182+ [workspace .lints .clippy ]
183+ # Detects large stack-allocated futures that may cause stack overflow crashes (see threshold in clippy.toml)
184+ large_futures = " warn"
185+ used_underscore_binding = " warn"
186+ or_fun_call = " warn"
187+ unnecessary_lazy_evaluations = " warn"
188+ uninlined_format_args = " warn"
189+ inefficient_to_string = " warn"
190+
191+ [workspace .lints .rust ]
192+ unexpected_cfgs = { level = " warn" , check-cfg = [
193+ ' cfg(datafusion_coop, values("tokio", "tokio_fallback", "per_stream"))' ,
194+ " cfg(tarpaulin)" ,
195+ " cfg(tarpaulin_include)" ,
196+ ] }
197+ unused_qualifications = " deny"
198+
199+ # --------------------
200+ # Compilation Profiles
201+ # --------------------
202+ # A Cargo profile is a preset for the compiler/linker knobs that trade off:
203+ # - Build time: how quickly code compiles and links
204+ # - Runtime performance: how fast the resulting binaries execute
205+ # - Binary size: how large the executables end up
206+ # - Debuggability: how much debug information is preserved for debugging and profiling
207+ #
208+ # Profiles available:
209+ # - dev: default debug build; fastest to compile, slowest to run, full debug info
210+ # for everyday development.
211+ # Run: cargo run
212+ # - release: optimized build; slowest to compile, fastest to run, smallest
213+ # binaries for public releases.
214+ # Run: cargo run --release
215+ # - release-nonlto: skips LTO, so it builds quicker while staying close to
216+ # release performance. It is useful when developing performance optimizations.
217+ # Run: cargo run --profile release-nonlto
218+ # - profiling: inherits release optimizations but retains debug info to support
219+ # profiling tools and flamegraphs.
220+ # Run: cargo run --profile profiling
221+ # - ci: derived from `dev` but disables incremental builds and strips dependency
222+ # symbols to keep CI artifacts small and reproducible.
223+ # Run: cargo run --profile ci
224+ #
225+ # If you want to optimize compilation, the `compile_profile` benchmark can be useful.
226+ # See `benchmarks/README.md` for more details.
182227[profile .release ]
183228codegen-units = 1
184229lto = true
185230strip = true # Eliminate debug information to minimize binary size
186231
187- # the release profile takes a long time to build so we can use this profile during development to save time
188- # cargo build --profile release-nonlto
189232[profile .release-nonlto ]
190233codegen-units = 16
191234debug-assertions = false
@@ -202,33 +245,16 @@ debug = false
202245inherits = " dev"
203246incremental = false
204247
205- # ci turns off debug info, etc. for dependencies to allow for smaller binaries making caching more effective
248+ # This rule applies to every package except workspace members (dependencies
249+ # such as `arrow` and `tokio`). It disables debug info and related features on
250+ # dependencies so their binaries stay smaller, improving cache reuse.
206251[profile .ci .package ."*" ]
207252debug = false
208253debug-assertions = false
209254strip = " debuginfo"
210255incremental = false
211256
212- # release inherited profile keeping debug information and symbols
213- # for mem/cpu profiling
214257[profile .profiling ]
215258inherits = " release"
216259debug = true
217260strip = false
218-
219- [workspace .lints .clippy ]
220- # Detects large stack-allocated futures that may cause stack overflow crashes (see threshold in clippy.toml)
221- large_futures = " warn"
222- used_underscore_binding = " warn"
223- or_fun_call = " warn"
224- unnecessary_lazy_evaluations = " warn"
225- uninlined_format_args = " warn"
226- inefficient_to_string = " warn"
227-
228- [workspace .lints .rust ]
229- unexpected_cfgs = { level = " warn" , check-cfg = [
230- ' cfg(datafusion_coop, values("tokio", "tokio_fallback", "per_stream"))' ,
231- " cfg(tarpaulin)" ,
232- " cfg(tarpaulin_include)" ,
233- ] }
234- unused_qualifications = " deny"
0 commit comments