6 ms·
In theory you could tell the compiler to identify and statically link only those functions needed to make printf work (or a conservative approximation thereof).
by mystikal 11y ago
In theory you could tell the compiler to identify and statically link only those functions needed to make printf work (or a conservative approximation thereof).
- danieldk 11y agoAs far as I know, jemalloc is a substantial part of that binary size. See e.g.: https://github.com/japaric/rust-on-openwrt/issues/1#issuecomment-108425440 https://github.com/japaric/rust-on-openwrt/issues/1#issuecom... https://github.com/japaric/std-with-cargo#making-rust-binaries-smaller https://github.com/japaric/std-with-cargo#making-rust-binari...
- Manishearth 11y agoYeah, that's just running LTO (`-C lto`). This brings the binary size down a bit, thought you also need to opt out of jemalloc to get a good impact.