-
Notifications
You must be signed in to change notification settings - Fork 2
Minor Rust build improvements. #121
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
Conversation
688bfa0
to
e5c7e35
Compare
console_backend/Cargo.toml
Outdated
edition = "2018" | ||
|
||
[profile.dev] | ||
debug = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably only want to do this in CI, right? What's the impact on the ability to use gdb if this is disabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it is no good for gdb use. I confirmed that rustflags do get distributed correctly so added this to the environment vars.
8dfe846
to
d0b54ba
Compare
Cargo.toml
Outdated
[profile.release] | ||
lto = true | ||
codegen-units = 1 | ||
opt-level = 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unnecessary since it's the default for release: https://doc.rust-lang.org/cargo/reference/profiles.html#release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could try 'z' or 's' and see if it shrinks the installer size?
Cargo.toml
Outdated
[profile.release] | ||
lto = true | ||
codegen-units = 1 | ||
opt-level = "z" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This didn't change anything, so we should probably dump it
Three suggestions for speeding up CI from this article:
https://matklad.github.io/2021/09/04/fast-rust-builds.html
Results:
Consider a pass as a new commit to the PR triggering a rebuild.
Shows a large improvement on second plus passes through PRs.