librespot/core/build.rs
johannesd3 9253be7bc9 Small refactor of librespot-core
* Remove default impl for `SessionConfig`
* Move util mod to single file
* Restore privacy of mods
* Move `fn get_credentials` to application
* Remove `extern crate` statements
2021-02-23 22:22:51 +01:00

17 lines
547 B
Rust

use rand::distributions::Alphanumeric;
use rand::Rng;
use vergen::{generate_cargo_keys, ConstantsFlags};
fn main() {
let mut flags = ConstantsFlags::all();
flags.toggle(ConstantsFlags::REBUILD_ON_HEAD_CHANGE);
generate_cargo_keys(ConstantsFlags::all()).expect("Unable to generate the cargo keys!");
let mut rng = rand::thread_rng();
let build_id: String = ::std::iter::repeat(())
.map(|()| rng.sample(Alphanumeric))
.take(8)
.collect();
println!("cargo:rustc-env=VERGEN_BUILD_ID={}", build_id);
}