From 04df7a64f78fe2e596ff5fd90f370135648646f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Jan 2023 04:01:59 +0000 Subject: [PATCH 1/4] chore(deps): bump clap from 3.2.23 to 4.1.1 Bumps [clap](https://github.com/clap-rs/clap) from 3.2.23 to 4.1.1. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.23...v4.1.1) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Cargo.lock | 163 +++++++++++++++++++++++++++++++++++++++++++---------- Cargo.toml | 2 +- 2 files changed, 135 insertions(+), 30 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 59bb801..31ad9d5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,7 +29,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi", ] @@ -90,25 +90,23 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "3.2.23" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" +checksum = "4ec7a4128863c188deefe750ac1d1dfe66c236909f845af04beed823638dc1b2" dependencies = [ - "atty", "bitflags", "clap_lex", - "indexmap", + "is-terminal", "once_cell", "strsim", "termcolor", - "textwrap", ] [[package]] name = "clap_lex" -version = "0.2.4" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade" dependencies = [ "os_str_bytes", ] @@ -237,6 +235,27 @@ dependencies = [ "termcolor", ] +[[package]] +name = "errno" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +dependencies = [ + "errno-dragonfly", + "libc", + "winapi", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "exr" version = "1.5.2" @@ -354,16 +373,19 @@ dependencies = [ ] [[package]] -name = "hashbrown" -version = "0.12.3" +name = "hermit-abi" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] [[package]] name = "hermit-abi" -version = "0.1.19" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" dependencies = [ "libc", ] @@ -394,22 +416,34 @@ dependencies = [ ] [[package]] -name = "indexmap" -version = "1.9.2" +name = "instant" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "autocfg", - "hashbrown", + "cfg-if", ] [[package]] -name = "instant" -version = "0.1.12" +name = "io-lifetimes" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e" dependencies = [ - "cfg-if", + "libc", + "windows-sys", +] + +[[package]] +name = "is-terminal" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" +dependencies = [ + "hermit-abi 0.2.6", + "io-lifetimes", + "rustix", + "windows-sys", ] [[package]] @@ -448,6 +482,12 @@ version = "0.2.138" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" +[[package]] +name = "linux-raw-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" + [[package]] name = "lock_api" version = "0.4.9" @@ -567,7 +607,7 @@ version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", ] @@ -719,6 +759,20 @@ dependencies = [ "winapi", ] +[[package]] +name = "rustix" +version = "0.36.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4feacf7db682c6c329c4ede12649cd36ecab0f3be5b7d74e6a20304725db4549" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys", +] + [[package]] name = "scoped_threadpool" version = "0.1.9" @@ -816,12 +870,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "textwrap" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - [[package]] name = "threadpool" version = "1.8.1" @@ -954,6 +1002,63 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" + [[package]] name = "x11rb" version = "0.9.0" diff --git a/Cargo.toml b/Cargo.toml index a6cef55..15feac7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ simplerand = "1.3" humantime = "2.1" [dependencies.clap] -version = "3.2" +version = "4.1" features = ["cargo"] [dependencies.image] From 9e9271ccd51e38a6a1d7e52f2b839d43fa7a7e71 Mon Sep 17 00:00:00 2001 From: Sven Kanoldt Date: Fri, 20 Jan 2023 23:59:34 +0100 Subject: [PATCH 2/4] fix(cli): adjust to clap 4 new api --- src/cli.rs | 34 +++++++++++++++++----------------- src/common/utils.rs | 20 +++++++++++++++----- src/main.rs | 38 ++++++++++++++++++-------------------- 3 files changed, 50 insertions(+), 42 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index e03509d..1c14712 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,4 +1,5 @@ -use clap::{crate_authors, crate_description, crate_version, Arg, ArgMatches, Command}; +use clap::builder::NonEmptyStringValueParser; +use clap::{crate_authors, crate_description, crate_version, Arg, ArgAction, ArgMatches, Command}; pub fn launch() -> ArgMatches { Command::new("t-rec") @@ -8,14 +9,15 @@ pub fn launch() -> ArgMatches { .about(crate_description!()) .arg( Arg::new("verbose") - .takes_value(false) + .action(ArgAction::SetTrue) .short('v') .long("verbose") .required(false) .help("Enable verbose insights for the curious") ) - .arg(Arg::new("quiet") - .takes_value(false) + .arg( + Arg::new("quiet") + .action(ArgAction::SetTrue) .short('q') .long("quiet") .required(false) @@ -23,7 +25,7 @@ pub fn launch() -> ArgMatches { ) .arg( Arg::new("video") - .takes_value(false) + .action(ArgAction::SetTrue) .short('m') .long("video") .required(false) @@ -31,7 +33,7 @@ pub fn launch() -> ArgMatches { ) .arg( Arg::new("video-only") - .takes_value(false) + .action(ArgAction::SetTrue) .short('M') .long("video-only") .required(false) @@ -40,8 +42,7 @@ pub fn launch() -> ArgMatches { ) .arg( Arg::new("decor") - .takes_value(true) - .possible_values(["shadow", "none"]) + .value_parser(["shadow", "none"]) .default_value("none") .required(false) .short('d') @@ -50,8 +51,7 @@ pub fn launch() -> ArgMatches { ) .arg( Arg::new("bg") - .takes_value(true) - .possible_values(["white", "black", "transparent"]) + .value_parser(["white", "black", "transparent"]) .default_value("transparent") .required(false) .short('b') @@ -60,8 +60,8 @@ pub fn launch() -> ArgMatches { ) .arg( Arg::new("natural-mode") + .action(ArgAction::SetTrue) .value_name("natural") - .takes_value(false) .required(false) .short('n') .long("natural") @@ -69,8 +69,8 @@ pub fn launch() -> ArgMatches { ) .arg( Arg::new("list-windows") + .action(ArgAction::SetTrue) .value_name("list all visible windows with name and id") - .takes_value(false) .required(false) .short('l') .long("ls-win") @@ -78,7 +78,7 @@ pub fn launch() -> ArgMatches { ) .arg( Arg::new("win-id") - .takes_value(true) + .value_parser(clap::value_parser!(u64)) .short('w') .long("win-id") .required(false) @@ -86,8 +86,8 @@ pub fn launch() -> ArgMatches { ) .arg( Arg::new("end-pause") + .value_parser(NonEmptyStringValueParser::new()) .value_name("s | ms | m") - .takes_value(true) .required(false) .short('e') .long("end-pause") @@ -95,8 +95,8 @@ pub fn launch() -> ArgMatches { ) .arg( Arg::new("start-pause") + .value_parser(NonEmptyStringValueParser::new()) .value_name("s | ms | m") - .takes_value(true) .required(false) .short('s') .long("start-pause") @@ -104,7 +104,7 @@ pub fn launch() -> ArgMatches { ) .arg( Arg::new("file") - .takes_value(true) + .value_parser(NonEmptyStringValueParser::new()) .required(false) .short('o') .long("output") @@ -114,7 +114,7 @@ pub fn launch() -> ArgMatches { .arg( Arg::new("program") .value_name("shell or program to launch") - .takes_value(true) + .value_parser(NonEmptyStringValueParser::new()) .required(false) .help("If you want to start a different program than $SHELL you can pass it here. For example '/bin/sh'"), ).get_matches() diff --git a/src/common/utils.rs b/src/common/utils.rs index 4e30e5a..f026cb4 100644 --- a/src/common/utils.rs +++ b/src/common/utils.rs @@ -34,12 +34,22 @@ pub fn clear_screen() { } /// parses a human duration string into something valid -pub fn parse_delay(s: Option<&str>, t: &str) -> crate::Result> { - if let Some(d) = s.map(parse_duration) { - let d = - d.with_context(|| format!("{} had an invalid format, allowed is 0ms < XXs <= 5m", t))?; +pub fn parse_delay( + s: Option>, + t: impl AsRef, +) -> crate::Result> { + if let Some(d) = s.map(|s| parse_duration(s.as_ref())) { + let d = d.with_context(|| { + format!( + "{} had an invalid format, allowed is 0ms < XXs <= 5m", + t.as_ref() + ) + })?; if d > MAX_DELAY { - anyhow::bail!("{} was out of range, allowed is 0ms < XXs <= 5m", t) + anyhow::bail!( + "{} was out of range, allowed is 0ms < XXs <= 5m", + t.as_ref() + ) } else { Ok(Some(d)) } diff --git a/src/main.rs b/src/main.rs index e28e7b7..a5a859b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,13 +61,13 @@ fn main() -> Result<()> { env_logger::init(); let args = launch(); - if args.is_present("list-windows") { + if args.get_flag("list-windows") { return ls_win(); } let program: String = { - if args.is_present("program") { - args.value_of("program").unwrap().to_owned() + if args.contains_id("program") { + args.get_one::("program").unwrap().to_string() } else { let default = DEFAULT_SHELL.to_owned(); env::var("SHELL").unwrap_or(default) @@ -77,12 +77,12 @@ fn main() -> Result<()> { let mut api = setup()?; api.calibrate(win_id)?; - let force_natural = args.is_present("natural-mode"); - let should_generate_gif = !args.is_present("video-only"); - let should_generate_video = args.is_present("video") || args.is_present("video-only"); + let force_natural = args.get_flag("natural-mode"); + let should_generate_gif = !args.get_flag("video-only"); + let should_generate_video = args.get_flag("video") || args.get_flag("video-only"); let (start_delay, end_delay) = ( - parse_delay(args.value_of("start-pause"), "start-pause")?, - parse_delay(args.value_of("end-pause"), "end-pause")?, + parse_delay(args.get_one::("start-pause"), "start-pause")?, + parse_delay(args.get_one::("end-pause"), "end-pause")?, ); if should_generate_gif { @@ -109,7 +109,7 @@ fn main() -> Result<()> { let interact = thread::spawn(move || -> Result<()> { sub_shell_thread(&program).map(|_| ()) }); clear_screen(); - if args.is_present("verbose") { + if args.get_flag("verbose") { println!( "Frame cache dir: {:?}", tempdir.lock().expect("Cannot lock tempdir resource").path() @@ -120,7 +120,7 @@ fn main() -> Result<()> { println!("Recording window id: {}", win_id); } } - if args.is_present("quiet") { + if args.get_flag("quiet") { println!(); } else { println!("[t-rec]: Press Ctrl+D to end recording"); @@ -150,15 +150,15 @@ fn main() -> Result<()> { tempdir.lock().unwrap().borrow(), ); - if let Some("shadow") = args.value_of("decor") { + if let Some("shadow") = args.get_one::("decor").map(|s| s.as_ref()) { apply_shadow_effect( &time_codes.lock().unwrap(), tempdir.lock().unwrap().borrow(), - args.value_of("bg").unwrap().to_string(), + args.get_one::("bg").unwrap().to_string(), ) } - let target = target_file(args.value_of("file").unwrap()); + let target = target_file(args.get_one::("file").unwrap()); let mut time = Duration::default(); if should_generate_gif { @@ -194,13 +194,11 @@ fn main() -> Result<()> { /// and finding the Terminal in that list /// panics if WindowId was not was not there fn current_win_id(args: &ArgMatches) -> Result<(WindowId, Option)> { - match args.value_of("win-id").ok_or_else(|| env::var("WINDOWID")) { - Ok(win_id) => { - let win_id = win_id - .parse::() - .context("Cannot parse env variable 'WINDOWID' as number")?; - Ok((win_id, None)) - } + match args + .get_one::("win-id") + .ok_or_else(|| env::var("WINDOWID")) + { + Ok(win_id) => Ok((*win_id, None)), Err(_) => { let terminal = env::var("TERM_PROGRAM").context( "Env variable 'TERM_PROGRAM' was empty but is needed for figure out the WindowId. Please set it to e.g. TERM_PROGRAM=alacitty", From 9898b0020f2714957cae8b7ba5bfddd450c24abf Mon Sep 17 00:00:00 2001 From: Sven Kanoldt Date: Sat, 21 Jan 2023 00:00:57 +0100 Subject: [PATCH 3/4] chore(clippy): fix clippy lints --- src/linux/x11_api.rs | 2 +- src/macos/window_id.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/linux/x11_api.rs b/src/linux/x11_api.rs index c04ed67..d8f1df9 100644 --- a/src/linux/x11_api.rs +++ b/src/linux/x11_api.rs @@ -146,7 +146,7 @@ impl PlatformApi for X11Api { } else { name }; - wins.push((Some(name), window as u64)); + wins.push((Some(name), window)); } } diff --git a/src/macos/window_id.rs b/src/macos/window_id.rs index 35c4868..ddd80ca 100644 --- a/src/macos/window_id.rs +++ b/src/macos/window_id.rs @@ -44,8 +44,7 @@ pub fn window_list() -> Result { } let count = unsafe { CFArrayGetCount(window_list_info) }; for i in 0..count { - let dic_ref = - unsafe { CFArrayGetValueAtIndex(window_list_info, i as isize) as CFDictionaryRef }; + let dic_ref = unsafe { CFArrayGetValueAtIndex(window_list_info, i) as CFDictionaryRef }; if dic_ref.is_null() { unsafe { CFRelease(window_list_info.cast()); From 9a9dfd766fc777bc8e3effae0abdf76776f04e3e Mon Sep 17 00:00:00 2001 From: Sven Kanoldt Date: Sat, 21 Jan 2023 00:09:21 +0100 Subject: [PATCH 4/4] rebase --- Cargo.lock | 257 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 257 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 31ad9d5..2fc32a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,6 +23,115 @@ version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" +[[package]] +name = "async-channel" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-executor" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17adb73da160dfb475c183343c8cccd80721ea5a605d3eb57125f0a7b7a92d0b" +dependencies = [ + "async-lock", + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "slab", +] + +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock", + "autocfg", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-io" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794" +dependencies = [ + "async-lock", + "autocfg", + "concurrent-queue", + "futures-lite", + "libc", + "log", + "parking", + "polling", + "slab", + "socket2", + "waker-fn", + "windows-sys", +] + +[[package]] +name = "async-lock" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8101efe8695a6c17e02911402145357e718ac92d3ff88ae8419e84b1707b685" +dependencies = [ + "event-listener", + "futures-lite", +] + +[[package]] +name = "async-net" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4051e67316bc7eff608fe723df5d32ed639946adcd69e07df41fd42a7b411f1f" +dependencies = [ + "async-io", + "autocfg", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-process" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6381ead98388605d0d9ff86371043b5aa922a3905824244de40dc263a14fcba4" +dependencies = [ + "async-io", + "async-lock", + "autocfg", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "libc", + "signal-hook", + "windows-sys", +] + +[[package]] +name = "async-task" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" + +[[package]] +name = "atomic-waker" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599" + [[package]] name = "atty" version = "0.2.14" @@ -58,6 +167,20 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" +[[package]] +name = "blocking" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c67b173a56acffd6d2326fb7ab938ba0b00a71480e14902b2591c87bc5741e8" +dependencies = [ + "async-channel", + "async-lock", + "async-task", + "atomic-waker", + "fastrand", + "futures-lite", +] + [[package]] name = "bumpalo" version = "3.11.1" @@ -117,6 +240,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" +[[package]] +name = "concurrent-queue" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c278839b831783b70278b14df4d45e1beb1aad306c07bb796637de9a0e323e8e" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "core-foundation" version = "0.9.3" @@ -256,6 +388,12 @@ dependencies = [ "libc", ] +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + [[package]] name = "exr" version = "1.5.2" @@ -324,6 +462,27 @@ version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +[[package]] +name = "futures-io" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" + +[[package]] +name = "futures-lite" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + [[package]] name = "futures-sink" version = "0.3.25" @@ -652,6 +811,12 @@ version = "6.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" +[[package]] +name = "parking" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" + [[package]] name = "pin-project" version = "1.0.12" @@ -672,6 +837,12 @@ dependencies = [ "syn", ] +[[package]] +name = "pin-project-lite" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + [[package]] name = "png" version = "0.17.7" @@ -684,6 +855,20 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "polling" +version = "2.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" +dependencies = [ + "autocfg", + "cfg-if", + "libc", + "log", + "wepoll-ffi", + "windows-sys", +] + [[package]] name = "proc-macro2" version = "1.0.47" @@ -785,6 +970,25 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "signal-hook" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +dependencies = [ + "libc", +] + [[package]] name = "simplerand" version = "1.3.0" @@ -794,12 +998,48 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "slab" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] + [[package]] name = "smallvec" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +[[package]] +name = "smol" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" +dependencies = [ + "async-channel", + "async-executor", + "async-fs", + "async-io", + "async-lock", + "async-net", + "async-process", + "blocking", + "futures-lite", +] + +[[package]] +name = "socket2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "spin" version = "0.9.4" @@ -836,6 +1076,7 @@ dependencies = [ "core-foundation-sys", "core-graphics", "env_logger", + "flume", "humantime", "image", "log", @@ -843,6 +1084,7 @@ dependencies = [ "objc_id", "rayon", "simplerand", + "smol", "tempfile", "x11rb", ] @@ -896,6 +1138,12 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" +[[package]] +name = "waker-fn" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -962,6 +1210,15 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" +[[package]] +name = "wepoll-ffi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" +dependencies = [ + "cc", +] + [[package]] name = "winapi" version = "0.3.9"