make a new profile for codegen-units = 1

This commit is contained in:
Bryan Stitt 2023-02-02 13:55:48 -08:00
parent a3f2eff512
commit 671105fe07
2 changed files with 6 additions and 2 deletions

View File

@ -11,5 +11,9 @@ members = [
[profile.release]
# `debug = true` so that sentry can give us line numbers
debug = true
[profile.faster_release]
inherits = "release"
# spend longer compiling for a slightly faster binary
codegen-units = 1

View File

@ -61,10 +61,10 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
cargo nextest run
# build the application
# using the "--release" profile (which install does) is **very** important
# using a "release" profile (which install does) is **very** important
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/app/target \
cargo install --locked --no-default-features --root /opt/bin --path ./web3_proxy
cargo install --locked --no-default-features --profile faster_release --root /opt/bin --path ./web3_proxy
#
# We do not need the Rust toolchain to run the binary!