[package] name = "cargo_14" version = "0.1.0" edition = "2021" license = "MIT" description = "A random cargo crate for trying the process out" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] [profile.new_name] inherits = "dev" # <--- KEY opt-level = 1 # do something for all release profiles # cargo build --profile new_name [profile.dev] opt-level = 0 # cargo build [profile.release] # the number of optimizations Rust will apply to your code opt-level = 3 # cargo build --release