Open ximon18 opened 2 years ago
Update: In a quick local test using cross build
the resulting binary was significantly smaller when built with cross +nightly build
and the following addition to Cargo.toml
(26233520 bytes for krill
vs 34970356 bytes):
[profile.release]
panic = "abort"
+strip = "symbols"
This will not actually be available via Cargo in 1.58.0, rather in the next release. See https://github.com/rust-lang/rust/issues/72110#issuecomment-1012428365.
Currently the
pkg
build manually invokesstrip
on built binaries. However thepkg
build uses latest stable Rust and Rust 1.58.0 released two days from now will bring with it the new support for specifying binary stripping in the[profile.release]
section ofCargo.toml
. Using this will be less custom and hopefully will also be supported bycargo cross
cross-compiled builds which otherwise require manually specifying the right strip tool to use.