Skip to content

build.rs: use option_env! to register env variable dependency#128

Merged
nbdd0121 merged 1 commit intomainfrom
dev/build
Apr 11, 2026
Merged

build.rs: use option_env! to register env variable dependency#128
nbdd0121 merged 1 commit intomainfrom
dev/build

Conversation

@nbdd0121
Copy link
Copy Markdown
Member

@nbdd0121 nbdd0121 commented Apr 4, 2026

Cargo automatically registers environment variable as dependency if env! or option_env! is used, while std::env::var would require a manual cargo:rerun-if-env-changed print. Thus switch to use the macro.

Cargo automatically registers environment variable as dependency if `env!`
or `option_env!` is used, while `std::env::var` would require a manual
`cargo:rerun-if-env-changed` print. Thus switch to use the macro.

Signed-off-by: Gary Guo <gary@garyguo.net>
@nbdd0121 nbdd0121 requested a review from BennoLossin April 4, 2026 14:02
@nbdd0121 nbdd0121 merged commit fd7110d into main Apr 11, 2026
26 checks passed
@nbdd0121 nbdd0121 deleted the dev/build branch April 11, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant