Skip to content

Put crate metadata first in rlibs whenever possible #93806

Closed
@bjorn3

Description

@bjorn3
Member

In the past rlib metadata had to be the last archive member as the linker stops at the first non-object member. The rlib metadata has somewhat recently been changed to be wrapped in an object file on most platforms, which allows it to be anywhere in the rlib. Putting it first would allow for quicker metadata reading as it would no longer be necessary to read the header of every archive member to find the crate metadata, only the first member header.

Activity

added
I-slowIssue: Problems and improvements with respect to performance of generated code.
A-metadataArea: Crate metadata
on Feb 9, 2022
added
I-compiletimeIssue: Problems and improvements with respect to compile times.
and removed
I-slowIssue: Problems and improvements with respect to performance of generated code.
on Feb 9, 2022
added a commit that references this issue on Feb 20, 2022

Auto merge of rust-lang#93816 - bjorn3:rlib_metadata_first, r=nagisa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-metadataArea: Crate metadataI-compiletimeIssue: Problems and improvements with respect to compile times.WG-compiler-performanceWorking group: Compiler Performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @nikic@bjorn3

      Issue actions

        Put crate metadata first in rlibs whenever possible · Issue #93806 · rust-lang/rust