Currently, both the go-build-system and the cargo-build-system treat dependencies as source code that is only built when building the top package in the tree. That is, the package the user requested to build or install.
But, the two build systems handle things quite differently. It would be great to have a generic mechanism for this sort of source-code-only dependency.
