chiark / gitweb /
structopt
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 22 Dec 2020 21:08:10 +0000 (21:08 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 22 Dec 2020 21:08:10 +0000 (21:08 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Cargo.lock.example
wdriver.rs
wdriver/Cargo.toml
wdriver/simple.rs

index 8d9012f45333e157844c419cc4c58a6727eabcab..1420f23a2eb1b63c76f04bc117265dbaa4e1b2ea 100644 (file)
@@ -79,6 +79,15 @@ dependencies = [
  "memchr",
 ]
 
+[[package]]
+name = "ansi_term"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
+dependencies = [
+ "winapi 0.3.9",
+]
+
 [[package]]
 name = "anyhow"
 version = "1.0.36"
@@ -269,6 +278,21 @@ dependencies = [
  "parse-zoneinfo",
 ]
 
+[[package]]
+name = "clap"
+version = "2.33.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002"
+dependencies = [
+ "ansi_term",
+ "atty",
+ "bitflags",
+ "strsim 0.8.0",
+ "textwrap",
+ "unicode-width",
+ "vec_map",
+]
+
 [[package]]
 name = "console_error_panic_hook"
 version = "0.1.6"
@@ -351,7 +375,7 @@ dependencies = [
  "ident_case",
  "proc-macro2 1.0.24",
  "quote 1.0.8",
- "strsim",
+ "strsim 0.9.3",
  "syn 1.0.55",
 ]
 
@@ -828,9 +852,9 @@ checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
 
 [[package]]
 name = "heck"
-version = "0.3.1"
+version = "0.3.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
+checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac"
 dependencies = [
  "unicode-segmentation",
 ]
@@ -1510,6 +1534,7 @@ version = "0.0.1"
 dependencies = [
  "anyhow",
  "fehler",
+ "structopt",
  "thirtyfour_sync",
 ]
 
@@ -1717,6 +1742,30 @@ version = "0.2.10"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857"
 
+[[package]]
+name = "proc-macro-error"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
+dependencies = [
+ "proc-macro-error-attr",
+ "proc-macro2 1.0.24",
+ "quote 1.0.8",
+ "syn 1.0.55",
+ "version_check 0.9.2",
+]
+
+[[package]]
+name = "proc-macro-error-attr"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
+dependencies = [
+ "proc-macro2 1.0.24",
+ "quote 1.0.8",
+ "version_check 0.9.2",
+]
+
 [[package]]
 name = "proc-macro-hack"
 version = "0.5.19"
@@ -2245,12 +2294,42 @@ version = "0.4.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "3015a7d0a5fd5105c91c3710d42f9ccf0abfb287d62206484dcc67f9569a6483"
 
+[[package]]
+name = "strsim"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
+
 [[package]]
 name = "strsim"
 version = "0.9.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c"
 
+[[package]]
+name = "structopt"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5277acd7ee46e63e5168a80734c9f6ee81b1367a7d8772a2d765df2a3705d28c"
+dependencies = [
+ "clap",
+ "lazy_static",
+ "structopt-derive",
+]
+
+[[package]]
+name = "structopt-derive"
+version = "0.4.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ba9cdfda491b814720b6b06e0cac513d922fc407582032e8706e9f137976f90"
+dependencies = [
+ "heck",
+ "proc-macro-error",
+ "proc-macro2 1.0.24",
+ "quote 1.0.8",
+ "syn 1.0.55",
+]
+
 [[package]]
 name = "strum"
 version = "0.20.0"
@@ -2353,6 +2432,15 @@ dependencies = [
  "url 1.7.2",
 ]
 
+[[package]]
+name = "textwrap"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
+dependencies = [
+ "unicode-width",
+]
+
 [[package]]
 name = "thirtyfour"
 version = "0.21.1"
@@ -2717,6 +2805,12 @@ version = "1.7.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796"
 
+[[package]]
+name = "unicode-width"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"
+
 [[package]]
 name = "unicode-xid"
 version = "0.1.0"
@@ -2774,6 +2868,12 @@ version = "0.2.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb"
 
+[[package]]
+name = "vec_map"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
+
 [[package]]
 name = "vecdeque-stableix"
 version = "1.0.0"
index 8e91d7e3dbc154a8380cc4cb4ff1a706605ac6ca..e776ca0d86e12f9e870c31caaa880698565ecead 100644 (file)
@@ -3,5 +3,6 @@
 // There is NO WARRANTY.
 
 pub use fehler::throws;
+pub use structopt::StructOpt;
 
 pub type AE = anyhow::Error;
index dc32d41dcc37122e9a298f3852faf2ff9f998d1e..823b8a235fc7560262bebc47914efcde4a89dc56 100644 (file)
@@ -14,6 +14,7 @@ edition = "2018"
 anyhow = "1"
 fehler = "1"
 thirtyfour_sync = "0.21"
+structopt = "0.3"
 
 [lib]
 name = "otter_webdriver_tests"
index fb33033c85246484fe61a2b3c04c8cc25f731d2d..a33d9d857b980e5bf5b2d7ecc918e63909749197 100644 (file)
@@ -4,6 +4,11 @@
 
 use otter_webdriver_tests::*;
 
+#[derive(StructOpt)]
+struct Opts {
+  
+}
+
 #[throws(AE)]
 fn main(){