@@ -224,62 +224,57 @@ unused_qualifications = "deny"
224224# --------------------
225225# Compilation Profiles
226226# --------------------
227- # A Cargo profile is a preset for the compiler/linker knobs that trade off:
227+ # A Cargo profile is a preset for the compiler/linker knobs that trades off:
228228# - Build time: how quickly code compiles and links
229229# - Runtime performance: how fast the resulting binaries execute
230230# - Binary size: how large the executables end up
231231# - Debuggability: how much debug information is preserved for debugging and profiling
232232#
233+ # To use a profile: `cargo [ build | run | ... ] --profile <profile-name>`
234+ #
233235# Profiles available:
234- # - dev: default debug build; fastest to compile, slowest to run, full debug info
235- # for everyday development.
236- # Run: cargo run
237- # - release: optimized build; slowest to compile, fastest to run, smallest
238- # binaries for public releases.
239- # Run: cargo run --release
240- # - release-nonlto: skips LTO, so it builds quicker while staying close to
241- # release performance. It is useful when developing performance optimizations.
242- # Run: cargo run --profile release-nonlto
236+ # - dev: default debug build; fastest to compile, slowest to run, full debug info.
237+ # For everyday development; default for "cargo [ build | test | run ]".
238+ # - release: fully optimized build; slowest to compile, fastest to run, smallest
239+ # binaries. For public releases; default for "cargo [ bench | install ]".
240+ # - release-nonlto: skips LTO, so it builds much faster while staying close to
241+ # release performance. Useful when developing performance optimizations.
243242# - profiling: inherits release optimizations but retains debug info to support
244243# profiling tools and flamegraphs.
245- # Run: cargo run --profile profiling
246- # - ci: derived from `dev` but disables incremental builds and strips dependency
247- # symbols to keep CI artifacts small and reproducible.
248- # Run: cargo run --profile ci
249- # - ci-optimized: derived from `release` but enables debug assertions, and uses
250- # lighter optimizations. Used for long-running CI tasks.
251- # Run: cargo run --profile ci-release
244+ # - ci: derived from `dev` but disables debug info and incremental builds to keep
245+ # CI artifacts small and reproducible.
246+ # - ci-optimized: derived from `release` but enables debug assertions and uses
247+ # less aggressive optimizations for faster builds. Used for long-running CI
248+ # tasks.
252249#
253250# If you want to optimize compilation, the `compile_profile` benchmark can be useful.
254251# See `benchmarks/README.md` for more details.
255252[profile .release ]
256253codegen-units = 1
257254lto = true
258- strip = true # Eliminate debug information to minimize binary size
255+ strip = true # Eliminate debug info to minimize binary size
259256
260257[profile .release-nonlto ]
261- codegen-units = 16
262- debug-assertions = false
263- incremental = false
264258inherits = " release"
259+ codegen-units = 16
265260lto = false
266- opt-level = 3
267- overflow-checks = false
268- rpath = false
269- strip = false # Retain debug info for flamegraphs
261+ strip = false # Retain debug info for flamegraphs
262+
263+ [profile .profiling ]
264+ inherits = " release"
265+ debug = true
266+ strip = false
270267
271268[profile .ci-optimized ]
272269inherits = " release"
273270debug-assertions = true
274271codegen-units = 16
275272lto = " thin"
276- strip = true
277273
278274[profile .ci ]
279- debug = false
280275inherits = " dev"
276+ debug = false
281277incremental = false
282- debug-assertions = true
283278
284279# This rule applies to every package except workspace members (dependencies
285280# such as `arrow` and `tokio`). It disables debug info and related features on
@@ -289,8 +284,3 @@ debug = false
289284debug-assertions = false
290285strip = " debuginfo"
291286incremental = false
292-
293- [profile .profiling ]
294- inherits = " release"
295- debug = true
296- strip = false
0 commit comments