Build.rs - how to print commands executed

Hi, I would like to see all of the commands executed by build.rs like e.g. command to compile zstd with all of the args passed. I've been trying with zstd-rs/zstd-safe/zstd-sys at main · gyscos/zstd-rs · GitHub and things like cargo build -vv but no luck. Is this possible?

zstd’s build script uses the cc crate for compiling. You can use the environment variable CC_ENABLE_DEBUG_OUTPUT combined with the -vv flag to get logging output from cc:

CC_ENABLE_DEBUG_OUTPUT=1 cargo build -vv

Indeed, I was earlier adding one or another but actually you need both: env var and -vv. Thanks a lot.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.