librespot-core 0.2.0

The core functionality provided by librespot
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 build_id: String = rand::thread_rng()
        .sample_iter(Alphanumeric)
        .take(8)
        .map(char::from)
        .collect();

    println!("cargo:rustc-env=LIBRESPOT_BUILD_ID={}", build_id);
}