From 14cfc8561220b17b714e7e292f88eb14568ebb1b Mon Sep 17 00:00:00 2001 From: sundaram123krishnan Date: Tue, 6 Aug 2024 17:19:02 +0530 Subject: [PATCH 01/14] Add help args --- src/piggui.rs | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/piggui.rs b/src/piggui.rs index 94d1cea0..130acae4 100644 --- a/src/piggui.rs +++ b/src/piggui.rs @@ -11,7 +11,6 @@ use crate::views::message_row::MessageMessage::Info; use crate::views::message_row::{MessageMessage, MessageRowMessage}; use crate::widgets::modal::Modal; use crate::Message::*; -#[cfg(not(target_arch = "wasm32"))] use clap::{Arg, ArgMatches}; use iced::widget::{container, Column}; use iced::{ @@ -106,14 +105,10 @@ impl Application for Piggui { type Flags = (); fn new(_flags: ()) -> (Piggui, Command) { - #[cfg(not(target_arch = "wasm32"))] let matches = get_matches(); - #[cfg(not(target_arch = "wasm32"))] let config_filename = matches .get_one::("config-file") .map(|s| s.to_string()); - #[cfg(target_arch = "wasm32")] - let config_filename = None; ( Self { @@ -314,10 +309,26 @@ fn get_hardware_target(matches: &ArgMatches) -> HardwareTarget { target } -#[cfg(not(target_arch = "wasm32"))] /// Parse the command line arguments using clap fn get_matches() -> ArgMatches { - let app = clap::Command::new(env!("CARGO_BIN_NAME")).version(env!("CARGO_PKG_VERSION")); + let app = clap::Command::new(env!("CARGO_BIN_NAME")).override_help( + &format!( + "{} v{}\n\ + {}\n\ + Usage: {} \n\n\ + Options:\n\ + -h, --help Display this message\n\ + -V, --version Display version info\n\ + -i, --install Install piglet as a System Service that restarts on reboot\n\ + -u, --uninstall Uninstall any piglet System Service\n\ + -v, --verbosity Set verbosity level for output (trace, debug, info, warn, error (default), off)\n\n\ + ", + env!("CARGO_BIN_NAME"), + env!("CARGO_PKG_VERSION"), + env!("CARGO_PKG_DESCRIPTION"), + env!("CARGO_BIN_NAME"), + ) + ).version(env!("CARGO_PKG_VERSION")); let app = app.about("'piggui' - Pi GPIO GUI for interacting with Raspberry Pi GPIO Hardware"); From 47adcaca6984e5b8ea65671d86627d06871d77d4 Mon Sep 17 00:00:00 2001 From: sundaram123krishnan Date: Tue, 6 Aug 2024 17:24:57 +0530 Subject: [PATCH 02/14] Add help args for piggui --- src/piggui.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/piggui.rs b/src/piggui.rs index 130acae4..bff8be35 100644 --- a/src/piggui.rs +++ b/src/piggui.rs @@ -319,9 +319,8 @@ fn get_matches() -> ArgMatches { Options:\n\ -h, --help Display this message\n\ -V, --version Display version info\n\ - -i, --install Install piglet as a System Service that restarts on reboot\n\ - -u, --uninstall Uninstall any piglet System Service\n\ - -v, --verbosity Set verbosity level for output (trace, debug, info, warn, error (default), off)\n\n\ + -n, --nodeid Node Id of a piglet instance to connect to\n\ + --config-file Path of a '.pigg' config file to load ", env!("CARGO_BIN_NAME"), env!("CARGO_PKG_VERSION"), From fb8efa2a1f4273cc1e9448b6d4543d01291600be Mon Sep 17 00:00:00 2001 From: sundaram123krishnan Date: Tue, 6 Aug 2024 17:25:06 +0530 Subject: [PATCH 03/14] Add help args for piglet --- src/piglet.rs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/piglet.rs b/src/piglet.rs index 9a14bc39..3db4cb74 100644 --- a/src/piglet.rs +++ b/src/piglet.rs @@ -152,7 +152,24 @@ fn setup_logging(matches: &ArgMatches) { /// Parse the command line arguments using clap fn get_matches() -> ArgMatches { - let app = Command::new(env!("CARGO_BIN_NAME")).version(env!("CARGO_PKG_VERSION")); + let app = clap::Command::new(env!("CARGO_BIN_NAME")).override_help( + &format!( + "{} v{}\n\ + {}\n\ + Usage: {} \n\n\ + Options:\n\ + -h, --help Display this message\n\ + -V, --version Display version info\n\ + -i, --install Install piglet as a System Service that restarts on reboot\n\ + -u, --uninstall Uninstall any piglet System Service\n\ + -v, --verbosity Set verbosity level for output (trace, debug, info, warn, error (default), off)\n\n\ + ", + env!("CARGO_BIN_NAME"), + env!("CARGO_PKG_VERSION"), + env!("CARGO_PKG_DESCRIPTION"), + env!("CARGO_BIN_NAME"), + ) + ).version(env!("CARGO_PKG_VERSION")); let app = app.about( "'piglet' - for making Raspberry Pi GPIO hardware accessible remotely using 'piggui'", From 464faa3d1367a052ac46401c5e669de406bf7ca0 Mon Sep 17 00:00:00 2001 From: sundaram123krishnan Date: Tue, 6 Aug 2024 17:58:54 +0530 Subject: [PATCH 04/14] Fix warnings --- src/piglet.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/piglet.rs b/src/piglet.rs index 3db4cb74..757a47d6 100644 --- a/src/piglet.rs +++ b/src/piglet.rs @@ -10,7 +10,7 @@ use std::time::Duration; use std::{env, fs, io, process}; use anyhow::Context; -use clap::{Arg, ArgMatches, Command}; +use clap::{Arg, ArgMatches}; use futures_lite::StreamExt; use iroh_net::endpoint::Connection; use iroh_net::relay::RelayUrl; From 9b30a0d99729eb024a8b5a59372c124890688614 Mon Sep 17 00:00:00 2001 From: sundaram123krishnan Date: Tue, 6 Aug 2024 22:07:23 +0530 Subject: [PATCH 05/14] Remove override help method --- src/piggui.rs | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/piggui.rs b/src/piggui.rs index bff8be35..9457775a 100644 --- a/src/piggui.rs +++ b/src/piggui.rs @@ -309,25 +309,10 @@ fn get_hardware_target(matches: &ArgMatches) -> HardwareTarget { target } +#[cfg(not(target_arch = "wasm32"))] /// Parse the command line arguments using clap fn get_matches() -> ArgMatches { - let app = clap::Command::new(env!("CARGO_BIN_NAME")).override_help( - &format!( - "{} v{}\n\ - {}\n\ - Usage: {} \n\n\ - Options:\n\ - -h, --help Display this message\n\ - -V, --version Display version info\n\ - -n, --nodeid Node Id of a piglet instance to connect to\n\ - --config-file Path of a '.pigg' config file to load - ", - env!("CARGO_BIN_NAME"), - env!("CARGO_PKG_VERSION"), - env!("CARGO_PKG_DESCRIPTION"), - env!("CARGO_BIN_NAME"), - ) - ).version(env!("CARGO_PKG_VERSION")); + let app = clap::Command::new(env!("CARGO_BIN_NAME")).version(env!("CARGO_PKG_VERSION")); let app = app.about("'piggui' - Pi GPIO GUI for interacting with Raspberry Pi GPIO Hardware"); From b441209ef1b56b7357d038ca1566a56a21d2f244 Mon Sep 17 00:00:00 2001 From: sundaram123krishnan Date: Tue, 6 Aug 2024 22:07:36 +0530 Subject: [PATCH 06/14] Remove override help method --- src/piglet.rs | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/piglet.rs b/src/piglet.rs index 757a47d6..0ba446a1 100644 --- a/src/piglet.rs +++ b/src/piglet.rs @@ -152,24 +152,7 @@ fn setup_logging(matches: &ArgMatches) { /// Parse the command line arguments using clap fn get_matches() -> ArgMatches { - let app = clap::Command::new(env!("CARGO_BIN_NAME")).override_help( - &format!( - "{} v{}\n\ - {}\n\ - Usage: {} \n\n\ - Options:\n\ - -h, --help Display this message\n\ - -V, --version Display version info\n\ - -i, --install Install piglet as a System Service that restarts on reboot\n\ - -u, --uninstall Uninstall any piglet System Service\n\ - -v, --verbosity Set verbosity level for output (trace, debug, info, warn, error (default), off)\n\n\ - ", - env!("CARGO_BIN_NAME"), - env!("CARGO_PKG_VERSION"), - env!("CARGO_PKG_DESCRIPTION"), - env!("CARGO_BIN_NAME"), - ) - ).version(env!("CARGO_PKG_VERSION")); + let app = clap::Command::new(env!("CARGO_BIN_NAME")).version(env!("CARGO_PKG_VERSION")); let app = app.about( "'piglet' - for making Raspberry Pi GPIO hardware accessible remotely using 'piggui'", From b9b9c937184b68c1a8f4de8a7b9fb048d709d638 Mon Sep 17 00:00:00 2001 From: sundaram123krishnan Date: Tue, 6 Aug 2024 22:08:12 +0530 Subject: [PATCH 07/14] Update `clap` version and remove `default-features = false` --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1adedf31..7701831f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,7 +66,7 @@ tempfile = "3" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] rfd = "0.14.1" -clap = { version = "4.5.11", default-features = false, features = ["std"] } +clap = { version = "4.5.13", features = ["std"]} [target.aarch64-unknown-linux-gnu.dependencies] rppal = "0.18.0" From 6f8f4bbae9322c162474454c1ba31e57565ce981 Mon Sep 17 00:00:00 2001 From: sundaram123krishnan Date: Tue, 6 Aug 2024 22:11:13 +0530 Subject: [PATCH 08/14] Lock --- Cargo.lock | 123 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 100 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d7223a98..c8a367e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -114,12 +114,55 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + [[package]] name = "anstyle" version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +[[package]] +name = "anstyle-parse" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + [[package]] name = "anyhow" version = "1.0.86" @@ -769,8 +812,10 @@ version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64b17d7ea74e9f833c7dbf2cbe4fb12ff26783eda4782a8975b72f895c9b4d99" dependencies = [ + "anstream", "anstyle", "clap_lex", + "strsim", ] [[package]] @@ -834,6 +879,12 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "colorchoice" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" + [[package]] name = "com" version = "0.6.0" @@ -966,7 +1017,7 @@ dependencies = [ "libm", "log", "rangemap", - "rustc-hash", + "rustc-hash 1.1.0", "rustybuzz", "self_cell", "swash", @@ -2391,9 +2442,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" dependencies = [ "bytes", "futures-channel", @@ -2504,7 +2555,7 @@ dependencies = [ "lyon_path", "once_cell", "raw-window-handle", - "rustc-hash", + "rustc-hash 1.1.0", "thiserror", "unicode-segmentation", "xxhash-rust", @@ -2557,7 +2608,7 @@ dependencies = [ "iced_graphics", "kurbo", "log", - "rustc-hash", + "rustc-hash 1.1.0", "softbuffer", "tiny-skia", "xxhash-rust", @@ -2857,7 +2908,7 @@ dependencies = [ "iroh-quinn-proto", "iroh-quinn-udp", "pin-project-lite", - "rustc-hash", + "rustc-hash 1.1.0", "rustls 0.21.12", "thiserror", "tokio", @@ -2873,7 +2924,7 @@ dependencies = [ "bytes", "rand", "ring", - "rustc-hash", + "rustc-hash 1.1.0", "rustls 0.21.12", "rustls-native-certs", "slab", @@ -2895,6 +2946,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itoa" version = "1.0.11" @@ -3265,7 +3322,7 @@ dependencies = [ "indexmap", "log", "num-traits", - "rustc-hash", + "rustc-hash 1.1.0", "spirv", "termcolor", "thiserror", @@ -3783,7 +3840,7 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "490d3a563d3122bf7c911a59b0add9389e5ec0f5f0c3ac6b91ff235a0e6a7f90" dependencies = [ - "ttf-parser 0.24.0", + "ttf-parser 0.24.1", ] [[package]] @@ -4430,16 +4487,17 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ceeeeabace7857413798eb1ffa1e9c905a9946a57d81fb69b4b71c4d8eb3ad" +checksum = "b22d8e7369034b9a7132bc2008cac12f2013c8132b45e0554e6e20e2617f2156" dependencies = [ "bytes", "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash", + "rustc-hash 2.0.0", "rustls 0.23.12", + "socket2", "thiserror", "tokio", "tracing", @@ -4447,14 +4505,14 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.3" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddf517c03a109db8100448a4be38d498df8a210a99fe0e1b9eaf39e78c640efe" +checksum = "ba92fb39ec7ad06ca2582c0ca834dfeadcaf06ddfc8e635c80aa7e1c05315fdd" dependencies = [ "bytes", "rand", "ring", - "rustc-hash", + "rustc-hash 2.0.0", "rustls 0.23.12", "slab", "thiserror", @@ -4471,6 +4529,7 @@ dependencies = [ "libc", "once_cell", "socket2", + "tracing", "windows-sys 0.52.0", ] @@ -4888,6 +4947,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc_version" version = "0.4.0" @@ -4978,9 +5043,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" [[package]] name = "rustls-webpki" @@ -5558,6 +5623,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "struct_iterable" version = "0.1.1" @@ -6137,9 +6208,9 @@ checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" [[package]] name = "ttf-parser" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8686b91785aff82828ed725225925b33b4fde44c4bb15876e5f7c832724c420a" +checksum = "5be21190ff5d38e8b4a2d3b6a3ae57f612cc39c96e83cedeaf7abc338a8bac4a" [[package]] name = "ttl_cache" @@ -6285,6 +6356,12 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "version_check" version = "0.9.5" @@ -6627,7 +6704,7 @@ dependencies = [ "parking_lot 0.12.3", "profiling", "raw-window-handle", - "rustc-hash", + "rustc-hash 1.1.0", "smallvec", "thiserror", "web-sys", @@ -6671,7 +6748,7 @@ dependencies = [ "range-alloc", "raw-window-handle", "renderdoc-sys", - "rustc-hash", + "rustc-hash 1.1.0", "smallvec", "thiserror", "wasm-bindgen", @@ -7306,9 +7383,9 @@ checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" [[package]] name = "xml-rs" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" +checksum = "539a77ee7c0de333dcc6da69b177380a0b81e0dacfa4f7344c465a36871ee601" [[package]] name = "xmltree" From 2a69bfbb85fb0802688c71bd460082c786b94d1b Mon Sep 17 00:00:00 2001 From: sundaram123krishnan Date: Tue, 6 Aug 2024 22:36:22 +0530 Subject: [PATCH 09/14] Rebase with `master` --- src/piggui.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/piggui.rs b/src/piggui.rs index 9457775a..94d1cea0 100644 --- a/src/piggui.rs +++ b/src/piggui.rs @@ -11,6 +11,7 @@ use crate::views::message_row::MessageMessage::Info; use crate::views::message_row::{MessageMessage, MessageRowMessage}; use crate::widgets::modal::Modal; use crate::Message::*; +#[cfg(not(target_arch = "wasm32"))] use clap::{Arg, ArgMatches}; use iced::widget::{container, Column}; use iced::{ @@ -105,10 +106,14 @@ impl Application for Piggui { type Flags = (); fn new(_flags: ()) -> (Piggui, Command) { + #[cfg(not(target_arch = "wasm32"))] let matches = get_matches(); + #[cfg(not(target_arch = "wasm32"))] let config_filename = matches .get_one::("config-file") .map(|s| s.to_string()); + #[cfg(target_arch = "wasm32")] + let config_filename = None; ( Self { From ddc60584513f4f7f45f380ee5b37d1eba892d94b Mon Sep 17 00:00:00 2001 From: sundaram123krishnan Date: Tue, 6 Aug 2024 22:36:56 +0530 Subject: [PATCH 10/14] Force `default-features = false` for `clap` --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7701831f..b4583137 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,7 +66,7 @@ tempfile = "3" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] rfd = "0.14.1" -clap = { version = "4.5.13", features = ["std"]} +clap = { version = "4.5.13", default-features = false, features = ["std", "help", "color"]} [target.aarch64-unknown-linux-gnu.dependencies] rppal = "0.18.0" From 27f6f97d703a3afabbaa265a988a1377a6693d09 Mon Sep 17 00:00:00 2001 From: sundaram123krishnan Date: Tue, 6 Aug 2024 22:37:08 +0530 Subject: [PATCH 11/14] Lock --- Cargo.lock | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c8a367e7..7064f3a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -815,7 +815,6 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim", ] [[package]] @@ -5623,12 +5622,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - [[package]] name = "struct_iterable" version = "0.1.1" From 074c68d4d7968eaedfe161881b619ff5cdb302c4 Mon Sep 17 00:00:00 2001 From: sundaram123krishnan Date: Wed, 7 Aug 2024 16:52:13 +0530 Subject: [PATCH 12/14] Remove `color` feature from `clap` --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 0083ad3c..7735042a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,7 +66,7 @@ tempfile = "3" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] rfd = "0.14.1" -clap = { version = "4.5.13", default-features = false, features = ["std", "help", "color"]} +clap = { version = "4.5.13", default-features = false, features = ["std", "help"]} [target.aarch64-unknown-linux-gnu.dependencies] rppal = "0.18.0" From 6ca16925b882e109fbbb209887c0adc9ab717cb9 Mon Sep 17 00:00:00 2001 From: sundaram123krishnan Date: Wed, 7 Aug 2024 16:52:31 +0530 Subject: [PATCH 13/14] Lock --- Cargo.lock | 76 +++++------------------------------------------------- 1 file changed, 7 insertions(+), 69 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7cb73b1d..86818d32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -114,55 +114,12 @@ dependencies = [ "libc", ] -[[package]] -name = "anstream" -version = "0.6.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - [[package]] name = "anstyle" version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" -[[package]] -name = "anstyle-parse" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - [[package]] name = "anyhow" version = "1.0.86" @@ -728,9 +685,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" +checksum = "504bdec147f2cc13c8b57ed9401fd8a147cc66b67ad5cb241394244f2c947549" dependencies = [ "jobserver", "libc", @@ -812,7 +769,6 @@ version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64b17d7ea74e9f833c7dbf2cbe4fb12ff26783eda4782a8975b72f895c9b4d99" dependencies = [ - "anstream", "anstyle", "clap_lex", ] @@ -878,12 +834,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "colorchoice" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" - [[package]] name = "com" version = "0.6.0" @@ -2945,12 +2895,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "is_terminal_polyfill" -version = "1.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" - [[package]] name = "itoa" version = "1.0.11" @@ -3761,9 +3705,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.2" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -5865,15 +5809,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.11.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fcd239983515c23a32fb82099f97d0b11b8c72f654ed659363a95c3dad7a53" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand 2.1.0", "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6349,12 +6293,6 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - [[package]] name = "version_check" version = "0.9.5" From 3ded65873b94710b6e357e8f357213490c0fb293 Mon Sep 17 00:00:00 2001 From: sundaram123krishnan Date: Wed, 7 Aug 2024 20:35:10 +0530 Subject: [PATCH 14/14] Add `error-context` feature to clap when to display --help when incorrect arguments passed --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 2ad3741a..b493a6f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,7 +66,7 @@ tempfile = "3" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] rfd = "0.14.1" -clap = { version = "4.5.13", default-features = false, features = ["std", "help"]} +clap = { version = "4.5.13", default-features = false, features = ["std", "help", "error-context"]} [target.aarch64-unknown-linux-gnu.dependencies] rppal = "0.18.0"