Reduces Hurl release binary size.

This commit is contained in:
jcamiel 2022-09-06 15:51:51 +02:00
parent 802d78359f
commit 88ad6a3d19
No known key found for this signature in database
GPG Key ID: 07FF11CFD55356CC
2 changed files with 8 additions and 2 deletions

View File

@ -4,3 +4,11 @@ members =[
"packages/hurlfmt", "packages/hurlfmt",
"packages/hurl_core", "packages/hurl_core",
] ]
[profile.release]
lto = true # Enable Link Time Optimization
codegen-units = 1 # Reduce number of codegen units to increase optimizations.
panic = "abort" # Abort on panic
strip = true # Automatically strip symbols from the binary.

View File

@ -4,8 +4,6 @@ set -e
PATH="$HOME"/.cargo/bin:$PATH PATH="$HOME"/.cargo/bin:$PATH
export PATH export PATH
cargo build --release --verbose --locked cargo build --release --verbose --locked
strip target/release/hurl
strip target/release/hurlfmt
target/release/hurl --version target/release/hurl --version