Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/smaller binaries #433

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

YOU54F
Copy link
Member

@YOU54F YOU54F commented Jun 5, 2024

Slim executables as per

[profile.release]
strip = true
opt-level = "z"
codegen-units = 1

we do not use lto=true, as this config is applied at the root level to both the pact_ffi and verifier_cli crates.

lto=true inflates the size of the static libraries dramatically generated by \pact_ffi`.

It may be prudent to apply these additional RUSTFLAGS in the release scripts for the verifier cli to allow for further executable size reductions.

Question

  • Should we elect
    • for setting these values conditionally in the release scripts
    • custom profile in Cargo.toml that inherits from release, such that we dont affect the release profile for other crates in the workspace?

Testing

Have been testing in this draft PR against my forks, which are all working as expected however it uncovered an issue in one of pact-net's test against the current released 0.4.20 version (more detail in the pr draft) - I've still to yak shave that one but it's not relevant to this PR

YOU54F#6

@YOU54F YOU54F marked this pull request as draft June 8, 2024 00:14
[profile.release]
strip = true
opt-level = "z"
codegen-units = 1

we do not use lto=true, as this config is applied at the root level to both the pact_ffi and verifier_cli crates. lto=true inflates the size of the static libraries dramatically. It may be prudent to apply this in the release scripts for the verifier cli to allow for further executable size reductions.

Should we elect for setting these values conditionally or via a seperate profile, such that we dont affect the --release profile for other crates in the workspace?
@YOU54F YOU54F marked this pull request as ready for review June 8, 2024 22:49
@YOU54F YOU54F requested a review from rholshausen June 10, 2024 21:52
@rholshausen rholshausen merged commit 788d952 into pact-foundation:master Jun 11, 2024
32 checks passed
@YOU54F YOU54F deleted the feat/smaller_binaries branch June 26, 2024 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants