-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.rs
34 lines (31 loc) · 1.11 KB
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// This is free and unencumbered software released into the public domain.
use cfg_aliases::cfg_aliases;
use shadow_rs::ShadowBuilder;
use std::collections::BTreeSet;
fn main() {
// See: https://github.com/katharostech/cfg_aliases
cfg_aliases! {
android: { target_os = "android" },
darwin: { any(
target_os = "ios",
target_os = "macos",
target_os = "tvos",
target_os = "watchos")
},
ios: { target_os = "ios" },
linux: { target_os = "linux" },
macos: { target_os = "macos" },
tvos: { target_os = "tvos" },
wasm: { target_family = "wasm" },
watchos: { target_os = "watchos" },
}
// See: https://github.com/baoyachi/shadow-rs
// Omit all nonpublic and/or sensitive information:
let mut omit = BTreeSet::new();
omit.insert(shadow_rs::CARGO_TREE);
omit.insert(shadow_rs::CARGO_MANIFEST_DIR);
omit.insert(shadow_rs::COMMIT_AUTHOR);
omit.insert(shadow_rs::COMMIT_EMAIL);
omit.insert(shadow_rs::GIT_STATUS_FILE);
ShadowBuilder::builder().deny_const(omit).build().unwrap();
}