Update http, once_cell, vergen

This commit is contained in:
Roderick van Domburg 2022-01-09 01:03:47 +01:00
parent 56f3c39fc6
commit fbff879f3d
No known key found for this signature in database
GPG key ID: FE2585E713F9F30A
4 changed files with 132 additions and 43 deletions

137
Cargo.lock generated
View file

@ -457,11 +457,43 @@ dependencies = [
"cfg-if 1.0.0",
]
[[package]]
name = "enum-iterator"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4eeac5c5edb79e4e39fe8439ef35207780a11f69c52cbe424ce3dfad4cb78de6"
dependencies = [
"enum-iterator-derive",
]
[[package]]
name = "enum-iterator-derive"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c134c37760b27a871ba422106eedbb8247da973a09e82558bf26d619c882b159"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "env_logger"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3"
dependencies = [
"atty",
"humantime",
"log",
"termcolor",
]
[[package]]
name = "env_logger"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3"
dependencies = [
"atty",
"humantime",
@ -620,12 +652,37 @@ dependencies = [
"wasi",
]
[[package]]
name = "getset"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9"
dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "gimli"
version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4"
[[package]]
name = "git2"
version = "0.13.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f29229cc1b24c0e6062f6e742aa3e256492a5323365e5ed3413599f8a5eff7d6"
dependencies = [
"bitflags",
"libc",
"libgit2-sys",
"log",
"url",
]
[[package]]
name = "glib"
version = "0.10.3"
@ -882,13 +939,13 @@ dependencies = [
[[package]]
name = "http"
version = "0.2.5"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b"
checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03"
dependencies = [
"bytes",
"fnv",
"itoa 0.4.8",
"itoa 1.0.1",
]
[[package]]
@ -1153,6 +1210,18 @@ version = "0.2.109"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f98a04dce437184842841303488f70d0188c5f51437d2a834dc097eafa909a01"
[[package]]
name = "libgit2-sys"
version = "0.12.26+1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19e1c899248e606fbfe68dcb31d8b0176ebab833b103824af31bddf4b7457494"
dependencies = [
"cc",
"libc",
"libz-sys",
"pkg-config",
]
[[package]]
name = "libloading"
version = "0.6.7"
@ -1250,7 +1319,7 @@ name = "librespot"
version = "0.3.1"
dependencies = [
"base64",
"env_logger",
"env_logger 0.8.4",
"futures-util",
"getopts",
"hex",
@ -1317,7 +1386,7 @@ dependencies = [
"bytes",
"chrono",
"dns-sd",
"env_logger",
"env_logger 0.9.0",
"form_urlencoded",
"futures-core",
"futures-util",
@ -1437,6 +1506,18 @@ dependencies = [
"protobuf-codegen-pure",
]
[[package]]
name = "libz-sys"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66"
dependencies = [
"cc",
"libc",
"pkg-config",
"vcpkg",
]
[[package]]
name = "lock_api"
version = "0.4.5"
@ -1813,9 +1894,9 @@ dependencies = [
[[package]]
name = "once_cell"
version = "1.8.0"
version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"
checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5"
[[package]]
name = "opaque-debug"
@ -2183,15 +2264,6 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
[[package]]
name = "rustc_version"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
dependencies = [
"semver",
]
[[package]]
name = "rustls"
version = "0.19.1"
@ -2250,6 +2322,12 @@ dependencies = [
"base64",
]
[[package]]
name = "rustversion"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f"
[[package]]
name = "ryu"
version = "1.0.6"
@ -2347,12 +2425,6 @@ dependencies = [
"libc",
]
[[package]]
name = "semver"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "568a8e6258aa33c13358f81fd834adb854c6f7c9468520910a9b1e8fac068012"
[[package]]
name = "serde"
version = "1.0.133"
@ -2932,14 +3004,25 @@ dependencies = [
]
[[package]]
name = "vergen"
version = "3.2.0"
name = "vcpkg"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7141e445af09c8919f1d5f8a20dae0b20c3b57a45dee0d5823c6ed5d237f15a"
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]]
name = "vergen"
version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd0c9f8387e118573859ae0e6c6fbdfa41bd1f4fbea451b0b8c5a81a3b8bc9e0"
dependencies = [
"bitflags",
"anyhow",
"cfg-if 1.0.0",
"chrono",
"rustc_version",
"enum-iterator",
"getset",
"git2",
"rustversion",
"thiserror",
]
[[package]]

View file

@ -23,7 +23,7 @@ form_urlencoded = "1.0"
futures-core = "0.3"
futures-util = { version = "0.3", features = ["alloc", "bilock", "sink", "unstable"] }
hmac = "0.12"
httparse = "1.3"
httparse = "1.5"
http = "0.2"
hyper = { version = "0.14", features = ["client", "http1", "http2", "tcp"] }
hyper-proxy = { version = "0.9", default-features = false, features = ["rustls"] }
@ -34,10 +34,10 @@ num-bigint = { version = "0.4", features = ["rand"] }
num-derive = "0.3"
num-integer = "0.1"
num-traits = "0.2"
once_cell = "1.5.2"
once_cell = "1.9"
parking_lot = { version = "0.11", features = ["deadlock_detection"] }
pbkdf2 = { version = "0.10", default-features = false, features = ["hmac"] }
priority-queue = "1.1"
priority-queue = "1.2.1"
protobuf = "2"
quick-xml = { version = "0.22", features = ["serialize"] }
rand = "0.8"
@ -50,16 +50,16 @@ tokio = { version = "1", features = ["io-util", "macros", "net", "parking_lot",
tokio-stream = "0.1"
tokio-tungstenite = { version = "*", default-features = false, features = ["rustls-tls-native-roots"] }
tokio-util = { version = "0.6", features = ["codec"] }
url = "2.1"
url = "2"
uuid = { version = "0.8", default-features = false, features = ["v4"] }
[build-dependencies]
rand = "0.8"
vergen = "3.0.4"
vergen = { version = "6", default-features = false, features = ["build", "git"] }
[dev-dependencies]
env_logger = "0.8"
tokio = { version = "1.0", features = ["macros", "parking_lot"] }
env_logger = "0.9"
tokio = { version = "1", features = ["macros", "parking_lot"] }
[features]
with-dns-sd = ["dns-sd"]

View file

@ -1,11 +1,17 @@
use rand::distributions::Alphanumeric;
use rand::Rng;
use vergen::{generate_cargo_keys, ConstantsFlags};
use rand::{distributions::Alphanumeric, Rng};
use vergen::{vergen, Config, ShaKind, TimestampKind};
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 config = Config::default();
*config.build_mut().kind_mut() = TimestampKind::DateOnly;
*config.git_mut().enabled_mut() = true;
*config.git_mut().commit_timestamp_mut() = true;
*config.git_mut().commit_timestamp_kind_mut() = TimestampKind::DateOnly;
*config.git_mut().sha_mut() = true;
*config.git_mut().sha_kind_mut() = ShaKind::Short;
*config.git_mut().rerun_on_head_change_mut() = true;
vergen(config).expect("Unable to generate the cargo keys!");
let build_id: String = rand::thread_rng()
.sample_iter(Alphanumeric)

View file

@ -1,14 +1,14 @@
/// Version string of the form "librespot-<sha>"
pub const VERSION_STRING: &str = concat!("librespot-", env!("VERGEN_SHA_SHORT"));
pub const VERSION_STRING: &str = concat!("librespot-", env!("VERGEN_GIT_SHA_SHORT"));
/// Generate a timestamp string representing the build date (UTC).
pub const BUILD_DATE: &str = env!("VERGEN_BUILD_DATE");
/// Short sha of the latest git commit.
pub const SHA_SHORT: &str = env!("VERGEN_SHA_SHORT");
pub const SHA_SHORT: &str = env!("VERGEN_GIT_SHA_SHORT");
/// Date of the latest git commit.
pub const COMMIT_DATE: &str = env!("VERGEN_COMMIT_DATE");
pub const COMMIT_DATE: &str = env!("VERGEN_GIT_COMMIT_DATE");
/// Librespot crate version.
pub const SEMVER: &str = env!("CARGO_PKG_VERSION");