I want to parameterize a crate of mine to be compiled for different hardware targets.
I don't want to use a feature for that, because the configuration targets should be mutually exclusive.
Within the code base the chosen target only affects a constant which is used throughout the code.
I want the user to choose the target device in their dependency config, analogous to features.
Does cargo support something like this?
The target in this context is not a cargo target as available, but a set of different network co-processor (NCP) models from the same series of a hardware vendor.
I thought about this a bit more and decided, that a cargo config is not really suitable for my use case due to transient dependencies. I ended up using const_env to allow users to override the value at compile-time.