Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add build.rs to hint rebuild binary once environment variable change #88

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

hero78119
Copy link
Collaborator

env variable change will not trigger re-build by default

For example

#[from_env]
const RAYON_NUM_THREADS: usize = 8;

Environment variable will only be fetch when first time compilation (e.g. cargo run/cargo bench...). Once it first time pass, changing environment variable will not refresh constant definition in binary.

Need to have "build.rs" to hints cargo tool.

@hero78119 hero78119 changed the title add missing build.rs add build.rs to hint rebuild binary once environment variable change Jul 10, 2024
@dreamATD dreamATD merged commit 69dd489 into master Jul 12, 2024
3 of 4 checks passed
yczhangsjtu pushed a commit that referenced this pull request Aug 12, 2024
hero78119 added a commit that referenced this pull request Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants