Update dependencies

This commit is contained in:
David Peter committed 2024-11-10 22:51:56 +01:00
1 parent 83f04cdd31
commit f0f2dccea6
5 files changed
+268 -328

No files matched your search

Generated
+243 -314
View File
File diff suppressed because it is too large. Load diff
+16 -8
View File
@@ -10,7 +10,7 @@ repository = "https://github.com/sharkdp/hyperfine"
version = "1.18.0" version = "1.18.0"
edition = "2018" edition = "2018"
build = "build.rs" build = "build.rs"
rust-version = "1.70.0" rust-version = "1.76.0"
[features] [features]
# Use the nightly feature windows_process_extensions_main_thread_handle # Use the nightly feature windows_process_extensions_main_thread_handle
@@ -20,20 +20,20 @@ windows_process_extensions_main_thread_handle = []
colored = "2.1" colored = "2.1"
indicatif = "=0.17.4" indicatif = "=0.17.4"
statistical = "1.0" statistical = "1.0"
csv = "1.1" csv = "1.3"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"
rust_decimal = "1.35" rust_decimal = "1.36"
rand = "0.8" rand = "0.8"
shell-words = "1.0" shell-words = "1.0"
thiserror = "1.0" thiserror = "2.0"
anyhow = "1.0" anyhow = "1.0"
[target.'cfg(not(windows))'.dependencies] [target.'cfg(not(windows))'.dependencies]
libc = "0.2" libc = "0.2"
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.48", features = [ windows-sys = { version = "0.59", features = [
"Win32_Foundation", "Win32_Foundation",
"Win32_Security", "Win32_Security",
"Win32_System_JobObjects", "Win32_System_JobObjects",
@@ -45,18 +45,26 @@ windows-sys = { version = "0.48", features = [
once_cell = "1.19" once_cell = "1.19"
[target.'cfg(target_os="linux")'.dependencies] [target.'cfg(target_os="linux")'.dependencies]
nix = { version = "0.27.1", features = ["zerocopy"] } nix = { version = "0.29", features = ["zerocopy"] }
[dependencies.clap] [dependencies.clap]
version = "4" version = "4"
default-features = false default-features = false
features = ["suggestions", "color", "wrap_help", "cargo", "help", "usage", "error-context"] features = [
"suggestions",
"color",
"wrap_help",
"cargo",
"help",
"usage",
"error-context",
]
[dev-dependencies] [dev-dependencies]
approx = "0.5" approx = "0.5"
assert_cmd = "2.0" assert_cmd = "2.0"
predicates = "3.0" predicates = "3.0"
tempfile = "3.9" tempfile = "3.14"
[build-dependencies] [build-dependencies]
clap = "4.4.12" clap = "4.4.12"
+1 -1
View File
@@ -316,7 +316,7 @@ Hyperfine can be installed from source via [cargo](https://doc.rust-lang.org/car
cargo install --locked hyperfine cargo install --locked hyperfine
``` ```
Make sure that you use Rust 1.70 or newer. Make sure that you use Rust 1.76 or newer.
### From binaries (Linux, macOS, Windows) ### From binaries (Linux, macOS, Windows)
+3 -3
View File
@@ -11,7 +11,7 @@ use nix::fcntl::{splice, SpliceFFlags};
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
use std::fs::File; use std::fs::File;
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
use std::os::unix::io::AsRawFd; use std::os::fd::AsFd;
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
use windows_sys::Win32::System::Threading::CREATE_SUSPENDED; use windows_sys::Win32::System::Threading::CREATE_SUSPENDED;
@@ -53,9 +53,9 @@ fn discard(output: ChildStdout) {
{ {
if let Ok(file) = File::create("/dev/null") { if let Ok(file) = File::create("/dev/null") {
while let Ok(bytes) = splice( while let Ok(bytes) = splice(
output.as_raw_fd(), output.as_fd(),
None, None,
file.as_raw_fd(), file.as_fd(),
None, None,
CHUNK_SIZE, CHUNK_SIZE,
SpliceFFlags::empty(), SpliceFFlags::empty(),
+5 -2
View File
@@ -37,7 +37,7 @@ static NtResumeProcess: Lazy<unsafe extern "system" fn(ProcessHandle: HANDLE) ->
Lazy::new(|| { Lazy::new(|| {
// SAFETY: Getting the module handle for ntdll.dll is safe // SAFETY: Getting the module handle for ntdll.dll is safe
let ntdll = unsafe { GetModuleHandleW(w!("ntdll.dll")) }; let ntdll = unsafe { GetModuleHandleW(w!("ntdll.dll")) };
assert!(ntdll != 0, "GetModuleHandleW failed"); assert!(ntdll != std::ptr::null_mut(), "GetModuleHandleW failed");
// SAFETY: The ntdll handle is valid // SAFETY: The ntdll handle is valid
let nt_resume_process = unsafe { GetProcAddress(ntdll, s!("NtResumeProcess")) }; let nt_resume_process = unsafe { GetProcAddress(ntdll, s!("NtResumeProcess")) };
@@ -56,7 +56,10 @@ impl CPUTimer {
// SAFETY: Creating a new job object is safe // SAFETY: Creating a new job object is safe
let job_object = unsafe { CreateJobObjectW(ptr::null_mut(), ptr::null_mut()) }; let job_object = unsafe { CreateJobObjectW(ptr::null_mut(), ptr::null_mut()) };
assert!(job_object != 0, "CreateJobObjectW failed"); assert!(
job_object != std::ptr::null_mut(),
"CreateJobObjectW failed"
);
// SAFETY: The job object handle is valid // SAFETY: The job object handle is valid
let ret = unsafe { AssignProcessToJobObject(job_object, child_handle) }; let ret = unsafe { AssignProcessToJobObject(job_object, child_handle) };