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

Create a binary-size working group #671

Closed
1 of 3 tasks
thomcc opened this issue Sep 6, 2023 · 3 comments
Closed
1 of 3 tasks

Create a binary-size working group #671

thomcc opened this issue Sep 6, 2023 · 3 comments
Labels
major-change A proposal to make a major change to rustc major-change-accepted A major change proposal that was accepted T-compiler Add this label so rfcbot knows to poll the compiler team

Comments

@thomcc
Copy link
Member

thomcc commented Sep 6, 2023

Proposal

The binary size of Rust programs and libraries is a frequent complaint from users, so in order to centralize and track all efforts that reduce binary size of these artifacts, we propose forming a Binary Size Working Group (wg-binary-size) under t-compiler with support from t-libs.

This working group aims to, ultimately, reduce the binary size of Rust programs, or at least give users the tools to do so. To support that top-level goal, the group will work towards:

  • Identifying causes of binary bloat in Rust programs. This likely requires implementing (or extending) tooling to help measure this.
  • Triaging the backlog of I-heavy issues.
  • Identifying and addressing situations where our existing features for reducing binary size are insufficient or counter-productive (-Copt-level=z being larger than other opt-levels is a frequent complaint).
  • Identifying worthwhile size optimizations in the stdlib, and performing them.
  • Identifying and filling any gaps that exist in our documentation reducing Rust binary size.
  • Extending the performance suite to better detect cases where binary size improvements and/or regressions occur as a result of compiler changes.
  • Identifying cases where a new feature needs to be implemented, completed, or stabilized in the compiler, build tooling, library or even language, and try and work towards that. (Of course the ultimate decision here lies in the hands of the relevant teams).

And so on. Note that it seems very likely that the precise contents of this list will change/fluctuate as a result of measurement and data gathering.

Scope

The focus of the group is primarily artifacts which are frequently distributed or installed (for example bin, cdylib, dylib, or staticlib crates). Concretely, some things which are not considered in-scope include the total size of cargo's target directory, rustup toolchain bundles, or ephemeral build arifacts (for example metadata, incremental cache, and so on).

Explicitly in-scope are build configurations where std is present (in addition to no_std), and even optimization levels besides s and z (for example, if we can reduce the binary size of opt-level=3 without hurting performance, that would be a win).

Team

The leads will be myself (@thomcc) and Mara Bos (@m-ou-se). The initial list of members will be @davidtwco, @nbdd0121, @Kobzol, @nnethercote, @h1467792822, @workingjubilee, and @wain303009 although may grow over time.

Process

The main points of the Major Change Process are as follows:

  • File an issue describing the proposal.
  • A compiler team member or contributor who is knowledgeable in the area can second by writing @rustbot second.
    • Finding a "second" suffices for internal changes. If however, you are proposing a new public-facing feature, such as a -C flag, then full team check-off is required.
    • Compiler team members can initiate a check-off via @rfcbot fcp merge on either the MCP or the PR.
  • Once an MCP is seconded, the Final Comment Period begins. If no objections are raised after 10 days, the MCP is considered approved.

You can read more about Major Change Proposals on forge.

Comments

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

@thomcc thomcc added major-change A proposal to make a major change to rustc T-compiler Add this label so rfcbot knows to poll the compiler team labels Sep 6, 2023
@rustbot
Copy link
Collaborator

rustbot commented Sep 6, 2023

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

cc @rust-lang/compiler @rust-lang/compiler-contributors

@rustbot rustbot added the to-announce Announce this issue on triage meeting label Sep 6, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Sep 6, 2023

@rustbot second

@rustbot rustbot added the final-comment-period The FCP has started, most (if not all) team members are in agreement label Sep 6, 2023
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Sep 7, 2023
@wesleywiser wesleywiser added the major-change-accepted A major change proposal that was accepted label Sep 18, 2023
@rustbot rustbot added the to-announce Announce this issue on triage meeting label Sep 18, 2023
@wesleywiser wesleywiser added to-announce Announce this issue on triage meeting and removed final-comment-period The FCP has started, most (if not all) team members are in agreement to-announce Announce this issue on triage meeting labels Sep 18, 2023
@tgross35
Copy link

Link to the wg stream: https://rust-lang.zulipchat.com/#narrow/stream/405744-wg-binary-size/topic/stream.20events

@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major-change A proposal to make a major change to rustc major-change-accepted A major change proposal that was accepted T-compiler Add this label so rfcbot knows to poll the compiler team
Projects
None yet
Development

No branches or pull requests

6 participants