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

chore: enhance cargo workspace and release build #680

Merged
merged 4 commits into from
Aug 17, 2023

Conversation

carlocorradini
Copy link
Contributor

Related to PR #671

What has been changed:

  • Enhance cargo workspace utilization while avoiding repetitions
  • Updated release profile
    [profile.release]
    codegen-units = 1 # Better optimization
    lto = true # Link time optimization
    strip = true # Stripping

Copy link

@h3nill h3nill left a comment

Choose a reason for hiding this comment

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

one nitpick else LGTM

Cargo.toml Show resolved Hide resolved
@swanandx
Copy link
Member

also does codegen-units = 1 really help in our case? Setting it to 1 doesn't guarantee better optimization, therefore just asking haha

@carlocorradini
Copy link
Contributor Author

@swanandx From official documentation:

This flag controls how many code generation units the crate is split into. It takes an integer greater than 0.

When a crate is split into multiple codegen units, LLVM is able to process them in parallel. Increasing parallelism ?may speed up compile times, but may also produce slower code. Setting this to 1 may improve the performance of generated code, but may be slower to compile.

Copy link

@h3nill h3nill left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @carlocorradini 🎉

rumqttd/Cargo.toml Outdated Show resolved Hide resolved
@h3nill h3nill merged commit b7c3086 into bytebeamio:main Aug 17, 2023
3 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.

None yet

4 participants