For reference rust-lang/cargo#4463 is the issue for feature unification.
For the first case, how are you building for two different targets without already running the command you specified? Are you using the unstable package.forced-target? If so, that might be good feedback on the tracking issue. If not, it seems like you could move the activation of that feature to a target.cfg().dependencies
so it only activates when that one target-platform is built.
For the second,
cargo hack
might be a reasonable workaround- This starts to feel like "work associated with final artifacts" which is bigger than this and I suspect any non-trivial final artifact needs a build orchestrator around cargo.
As for the article you linked, they use cfg
dependencies and resolver = "2"
which has been around for quite a while now. There is also Pre-RFC discussion for a design for mutually exclusive, global features.