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: reduce executable size #57

Merged
merged 3 commits into from
May 9, 2024
Merged

Conversation

YOU54F
Copy link
Member

@YOU54F YOU54F commented Apr 30, 2024

Slim executables

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

YOU54F and others added 3 commits April 30, 2024 14:51
- create linux executables linked statically to musl
  - drop gnu (glibc) target, executable will work on alpine & glibc based distros (debian etc)
- create windows aarch64 target
- refactor release script & workflow to match pact-reference
  - builds on pull request to master/main branch, in debug mode

Related epics

- musl all the things
  - pact-foundation/roadmap#30
# Slim executables

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

## References
- https://doc.rust-lang.org/stable/rustc/codegen-options/
- https://doc.rust-lang.org/rustc/profile-guided-optimization.html
- https://github.com/johnthagen/min-sized-rust
@YOU54F YOU54F requested a review from rholshausen May 3, 2024 12:37
@rholshausen rholshausen merged commit 63b141f into pactflow:main May 9, 2024
8 of 9 checks passed
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