#Detect if we are running inside a proc macro?
9 messages · Page 1 of 1 (latest)
you could look for the environment variables that cargo adds to build scripts https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts
thanks, that was what I had in mind actually!
anyone have any idea which env var to look for?
Probably any combination of TARGET, NUM_JOBS, OPT_LEVEL, PROFILE
that's not exactly useful
those are the ones that aren't included in the normal files, and are not likely to be on the system
oh ah
I thought you would have to be searching for a specific value
I'm mistaken