Skip to content

[CHORE] Optimize binary size using release profile #6

@aarchiev

Description

@aarchiev

Problem

The compiled binary size is larger than necessary because Cargo.toml lacks aggressive optimization settings.

Solution

Update Cargo.toml to include a release profile that strips symbols and enables LTO (Link Time Optimization).

Suggested Changes

Add this to Cargo.toml:

[profile.release]
strip = true  # Automatically strip symbols from the binary.
opt-level = "z"  # Optimize for size.
lto = true
codegen-units = 1
panic = "abort"

Metadata

Metadata

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions