Skip to content

standard library results in enormous binaries #12199

Closed
@thestinger

Description

The initial binary size in C is ~3-8K, while Rust binaries using the standard library start at 2MiB. This problem doesn't stop with the initial code size and continues to grow at a rate much faster than C or C++ applications performing the same work. This is not a Rust compiler issue as it doesn't occur when not using the standard library, even when using an API at the same level of abstraction.

Rust is linking dynamically against the system libraries so there's really no excuse for them being this large. The code size needs to be in the same ballpark as C++ (at most 2x or 3x as large...).

Activity

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

Metadata

Assignees

No one assigned

    Labels

    I-slowIssue: Problems and improvements with respect to performance of generated code.metabugIssues about issues themselves ("bugs about bugs")

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions