shadow-rs icon indicating copy to clipboard operation
shadow-rs copied to clipboard

Separate out non-reproducible variables

Open jaskij opened this issue 1 year ago • 0 comments

Sometimes there is a reason to have byte-reproducible builds. As is, shadow-rs generates a number of variables, some of which are reproducible, while others are not. This may lead to users using such variables without consideration.

Ideally, I would like for the non-reproducible builds to be separated, either by using a non-default feature, or at least putting them in a separate module, so usage would look like:

shadow_rs::shadow!(build);

fn main() {
    println!("{}", build::non_reproducible::BUILD_TIME);//2020-08-16 14:50:25
}

If those are not options, at the very least documenting this would be a good idea.

jaskij avatar Oct 22 '24 13:10 jaskij