Cool. So I ran bloaty (with -d sections,segments,rawsymbols) on tinyrocket and used rustfilt[1] to demangle the symbols, and we have numbers for .rodata:
demangled Filesize (KiB)
idna::uts46::find_char 89.25
unicode_normalization::normalize::d 69.52
[384 Others] 43.48
rocket::config::RocketConfig::override_from_env 23.59
unicode_bidi::char_data::bidi_class 15.16
idna::uts46::decode_slice 12.23
unicode_normalization::normalize::compose 10.29
core::num::dec2flt::algorithm::power_of_ten 5.97
unicode_normalization::tables::normalization::canonical_comb 3.91
[section .rodata] 1.99
idna::uts46::validate 1.95
<hyper::status::StatusCode as core::fmt::Debug>::fmt 1.79
tinyrocket::main 1.46
core::num::flt2dec::strategy::grisu::CACHED_POW10 1.27
rocket::config::config::Config::set_raw 1.15
time::display::parse_type 0.99
hyper::server::listener::spawn_with::{{closure}} 0.96
percent_encoding::percent_encode_byte 0.76
<hyper::status::StatusCode as core::fmt::Display>::fmt 0.71
rocket::catcher::defaults::get::handle_431 0.66
rocket::config::init::{{closure}} 0.65
Lots of unicode and idna stuff there. I think the binary size would be reduced significantly if we could drop those somehow.
Most likely those embedded HTML (error) pages are accounted in "rocket::config::RocketConfig::override_from_env", which sort of makes sense.
> It doesn't currently know anything about Rust's name mangling scheme. I'd be happy to add this, though I suppose Rust's mangling is probably written in Rust and Bloaty is written in C++.
I suppose you don't want to have a (optional) dependency to Rust code? It should be pretty easy to provide C interface to rustc-demangle[2] which would be usable from Bloaty.
[1] https://github.com/luser/rustfilt
[2] https://github.com/alexcrichton/rustc-demangle