-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
release-fast
and release-small
profiles and a page on packaging in the docs.
#4470
Conversation
Btw, we might need to advertise these alternative profiles a bit more after this. It would be nice to not have people complain about binary size for once when this project makes the rounds again 😄 |
f2759e5
to
ea955fd
Compare
Oh great, I now remember why stdbuf was using that variable in the first place: #2843. I'll look into a solution tomorrow. |
GNU testsuite comparison:
|
I think it would be nice to test both of them in the CI, don't you think ? :) |
Yes, I'll add that too! |
ea955fd
to
9d57378
Compare
9d57378
to
8c19ee3
Compare
On second thought, maybe it's not that helpful to add in the CI? Apart from the anomaly with stdbuf, the profile should have very little effect on whether or not it compiles. |
ok, you are probably correct :) |
@sylvestre I think this causes problems after all. Lot's of builds failing because of stdbuf. We should probably revert this. |
@tertsdiepraam it improves it significantly: |
Nice! And that's just the lto change too.
I'm not so sure about this anymore, it would be interesting to add it to the CI just for tracking the size. |
Inspired by #4436 and #747.
In the comments of #4436, I did an exploration of the binary size by trying different settings in cargo. The conclusion was that we can get the binary size down by a lot (even smaller than GNU), but that this will make bug reports less useful. Therefore, we should leave the exact configuration up to package maintainers. To document that, I've written a page on packaging this project in the docs. This page explains the best practices for the package name (since we had some issues there) and how to configure the package.
Additionally, to quickly see what our best performance and smallest binary size is, I've created the
release-fast
andrelease-small
profiles in addition to the standardrelease
profile. Therelease
profile also haslto
enabled, because that (probably) gives a performance boost and reduces the binary quite a bit, without removing any debug info, but compilation takes a bit slower. (I haven't benchmarked the performance and compile time though)The change in
stdbuf
is because it was using thePROFILE
env variable, which can only berelease
ordebug
and does not become, for example,release-fast
and was therefore failing to compile.@sylvestre, since you're packaging expert; is there anything else we should mention on the packaging page?