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

Reduce binary size #131

Merged
merged 2 commits into from
Nov 2, 2023
Merged

Reduce binary size #131

merged 2 commits into from
Nov 2, 2023

Conversation

lunacookies
Copy link
Collaborator

This PR reduces the size of a aarch64-apple-darwin release binary from 1MB to 628KB.

  • I enabled abort on panic in debug builds so that any problems caused by this are caught early. If it poses a problem during debugging it’s always possible to disable temporarily.
  • Removing symbols shouldn’t be an issue for release builds.
  • I changed the optimization level from 3 to z so LLVM optimizes for size rather than speed. pipes-rs is I/O-bound as it is, so I think we should value binary size over raw throughput (which is likely memory-bound anyway, lol).

@lhvy would it be too much trouble for you to test this on a Windows machine?

Copy link
Owner

@lhvy lhvy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✂️

@lhvy lhvy merged commit 83ab08f into master Nov 2, 2023
4 checks passed
@lhvy lhvy deleted the small-binaries branch November 2, 2023 05:33
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