C++ has had whole program optimization since forever. And you can use static linking if you want, the same as Rust.