I'd like to know whether it is currently possible to know from the build script which is the cargo command that triggered it, cargo doc vs cargo build for example.
It would be very useful for when there are some costly compilations that are only needed for the documentation.
Since it is indeed possible to set the feature of a dependency, thankfully I've been able to solve this use case by using the combination of two features. For the curious