Is there a way to remove unused code from the binary application, along with the used crates?
From my limited understanding of the compilation process, compiling all the code in all the hundreds of crates commonly used to build any usable project of any significant size, takes compilation times throw the roof and beyond. Is there a way to do what Angular tooling does in the world of Rust?
The focus in Rust is more to skip over pointless work as soon as possible in the compilation process, in order to speed up rustc. But one way or another unused functions, branches, or modules will never be present in finished production binaries. And if anything, Angular's tree shaking is an attempt to do what languages like C have done for decades.