I want to write a custom build.rs script that generates some diagrams to accompany the documentation for the box I'm working on. I want this script to be run only when cargo doc launched, and not in other profiles ( cargo build , cargo test , ...). What would be the best way to do this?
I was hoping the load would pass this information to build.rs in the PROFILE env variable, but it looks like it only contains "debug" or "release".
source share