You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can build httpget with nightly for some improvements in size reduction: neonmoe/minreq#111
Reproduction
I've adapted the referenced example to httpget build. I've omitted some extra optimizations from the linked issue which would be approx 20KB smaller (or 50%+ with UPX for further reduction via compression).
# Reproduction environment via Docker:
docker run --rm -it --workdir /build fedora:41
# - `lld` is optional, it's used with `-C link-arg=-fuse-ld=lld`,# slight improvement over the internal LLD linker the rust toolchain bundles# - `musl-gcc` is required for `--features tls` since we're building from a glibc host:
dnf install -y lld git gcc musl-gcc rustup-init
# Nightly rust with the musl target (for static build) and `rust-src` (for `-Z build-std`)# rustc 1.84.0-nightly (e7c0d2750 2024-10-15)
rustup-init -y \
--profile minimal \
--component rust-src \
--target x86_64-unknown-linux-musl \
--default-toolchain nightly
."$HOME/.cargo/env"
git clone --depth 1 https://github.com/cryptaliagy/httpget .
You can build
httpgetwith nightly for some improvements in size reduction: neonmoe/minreq#111Reproduction
I've adapted the referenced example to
httpgetbuild. I've omitted some extra optimizations from the linked issue which would be approx 20KB smaller (or 50%+ with UPX for further reduction via compression).HTTP only (127.5KB)
HTTPS (766KB)
Size improvement
cargo update+ UPXFor the
--features tlsresults, if you updateCargo.lockwithcargo updatethe sizes are1,268,056vs766,320, which is a nice improvement in savings.rustls, that was true with theCargo.lockbefore update dependencies #15Use UPX to bring the HTTPS build down to just 432KB 😎 (for an HTTP-only build, this reduces down to about 70KB)