I recently read a good article describing how Rust and their tool Cargo can use different options to add dependencies as dynamic libraries rather than static libraries, which can be used to speed up incremental compilation (because the dependencies do not have to be re-compiled).
https://robert.kra.hn/posts/2022-09-09-speeding-up-incremental-rust-compilation-with-dylibs/
It's a good read and it could inspire similar capabilities within dub.