diff --git a/Cargo.toml b/Cargo.toml index bfa95f0..76de2d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -74,3 +74,20 @@ trim-margin = "0.1.0" [build-dependencies] built = { version = "0.7.1", features = [ "git2" ] } os_info = "3.7.0" + +[profile.release] +strip = true # Automatically strip symbols from the binary. +opt-level = "z" # Optimize for size. +codegen-units = 1 +panic = "abort" +# lto = true +# https://github.com/johnthagen/min-sized-rust + +## Original Sizes +# 24M libpact_ffi.dylib +# 19M pact_verifier_cli +# 18M pact_mock_server_cli + +# libpactffi.dylib size 24M -> 9.4M +# pact_verifier_cli size 19M -> 6.4M +# pact_mock_server_cli size 19M -> 5.6M \ No newline at end of file