Does Rust compiler remove unused part of external crate?

79 points test1123321

Say I'm using an external crate from crates.io but I only need it for two things. Will the rust compiler remove all the unused things from that crate from the final product for a smaller binary size?