diff --git a/Cargo.toml b/Cargo.toml index 1d5c2238..2c2e0f74 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 diff --git a/Dockerfile b/Dockerfile index 11f40244..2bbd28d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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!