Testing a small http-client on Linux using no_std & embedded reqwless.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add binary size comparison table to README

rektide 3d0d65e4 8fe60d49

+30 -20
+30 -20
README.md
··· 57 57 58 58 The `xtask` `validate` subcommand group is self-documented in CLI help and can be explored as needed. 59 59 60 - ## Release size profile 60 + ## Binary size comparison 61 61 62 62 Release builds are tuned for binary size in `Cargo.toml`: 63 63 ··· 67 67 - `lto = true` 68 68 - `codegen-units = 1` 69 69 70 - Measured on this repository with `cargo build --release`: 70 + Nightly aggressive builds use additional optimizations: 71 71 72 - - HTTP profile (`--no-default-features --features backend-posix-libc,dns-getaddrinfo`) 73 - - Before: `84800` bytes 74 - - After: `43440` bytes 75 - - HTTPS profile (`--no-default-features --features backend-posix-libc,dns-getaddrinfo,https`) 76 - - Before: `631408` bytes 77 - - After: `296824` bytes 72 + - `RUSTFLAGS="-Zlocation-detail=none -Zfmt-debug=none -Zunstable-options -Cpanic=immediate-abort"` 73 + - `-Z build-std=std,panic_abort` 74 + - `-Z build-std-features=` 78 75 79 - ## Nightly aggressive size build 76 + ### HTTP builds 80 77 81 - For nightly-only size optimizations, including location/detail stripping, debug-fmt stripping, 82 - and `panic=immediate-abort`, use: 78 + | Features | Release | Nightly | Savings | 79 + |----------|---------|---------|---------| 80 + | `backend-posix-libc,dns-getaddrinfo` | 43,440 B | 41,288 B | -2,152 B (-5.0%) | 81 + | `backend-posix-libc,dns-ip-only` | 43,952 B | 41,864 B | -2,088 B (-4.8%) | 82 + | `backend-rustix,dns-getaddrinfo` | 43,512 B | 41,104 B | -2,408 B (-5.5%) | 83 + | `backend-rustix,dns-ip-only` | 43,784 B | 41,792 B | -1,992 B (-4.5%) | 83 84 84 - ```bash 85 - cargo run -p xtask -- nightly-size -- --no-default-features --features backend-posix-libc,dns-getaddrinfo 86 - ``` 85 + ### HTTPS builds 86 + 87 + | Features | Release | Nightly | Savings | 88 + |----------|---------|---------|---------| 89 + | `backend-posix-libc,dns-getaddrinfo,https` | 296,824 B | 296,112 B | -712 B (-0.2%) | 90 + | `backend-posix-libc,dns-ip-only,https` | 297,304 B | 296,832 B | -472 B (-0.2%) | 91 + | `backend-rustix,dns-getaddrinfo,https` | 296,592 B | 295,768 B | -824 B (-0.3%) | 92 + | `backend-rustix,dns-ip-only,https` | 297,344 B | 296,600 B | -744 B (-0.3%) | 87 93 88 - This command applies: 94 + ### Building for size 95 + 96 + For standard release builds: 89 97 90 - - `RUSTFLAGS="-Zlocation-detail=none -Zfmt-debug=none -Zunstable-options -Cpanic=immediate-abort"` 91 - - `-Z build-std=std,panic_abort` 92 - - `-Z build-std-features=` 98 + ```bash 99 + cargo build --release --no-default-features --features <features> 100 + ``` 93 101 94 - Measured with the HTTP profile above on this repository: 102 + For nightly aggressive size optimizations: 95 103 96 - - Nightly aggressive output size: `41288` bytes 104 + ```bash 105 + cargo run -p xtask -- nightly-size -- --no-default-features --features <features> 106 + ```