Skip to content

Huge binary sizes #53202

Closed
Closed
@buffet

Description

@buffet

Binaries are huge (3.8M for an empty project).

I tried this code (in a cargo newly generated project's main.rs):

fn main() {}

I expected to see this happen: Compiles to a binary that does nothing, about 500K in size

Instead, this happened: Compiles to a binary that does nothing, but is 3.8M in size

Meta

rustc --version --verbose:

rustc 1.28.0 (9634041f0 2018-07-30)
binary: rustc
commit-hash: 9634041f0e8c0f3191d2867311276f19d0a42564
commit-date: 2018-07-30
host: x86_64-unknown-linux-gnu
release: 1.28.0
LLVM version: 6.0

r2 ./target/release/binary_name and then executing the v command (a hex view) showed me that a large majority of the file where \xff bytes at the end of it.

Additional info

I did a rustup update today. Before empty binaries where 5.1M in size.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions