From d45337f04764c611cb7e4e4c2450dfdc28f60c3e Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Fri, 27 Oct 2023 15:25:39 -0400 Subject: [PATCH 1/2] feat(cli): add about blurb and `--version` to `--help` --- src/bin/moz-webgpu-cts/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/moz-webgpu-cts/main.rs b/src/bin/moz-webgpu-cts/main.rs index fabd1b2..5e1b79d 100644 --- a/src/bin/moz-webgpu-cts/main.rs +++ b/src/bin/moz-webgpu-cts/main.rs @@ -29,6 +29,7 @@ use whippit::{ }; #[derive(Debug, Parser)] +#[command(about, version)] struct Cli { #[clap(long)] gecko_checkout: Option, From 7f1949d0198eba196cae0be6d086d377c67da081 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Fri, 27 Oct 2023 15:48:49 -0400 Subject: [PATCH 2/2] build(cargo)!: split into a workspace of `whippit` library and `moz-webgpu-cts` binary --- Cargo.lock | 35 ++++++++++++------- Cargo.toml | 34 +++++------------- moz-webgpu-cts/Cargo.toml | 29 +++++++++++++++ .../src}/main.rs | 0 .../src}/metadata.rs | 0 .../src}/shared.rs | 0 whippit/Cargo.toml | 20 +++++++++++ {src => whippit/src}/lib.rs | 0 {src => whippit/src}/metadata.rs | 0 {src => whippit/src}/metadata/properties.rs | 0 .../src}/metadata/properties/conditional.rs | 0 .../metadata/properties/conditional/expr.rs | 0 .../src}/metadata/properties/unstructured.rs | 0 13 files changed, 80 insertions(+), 38 deletions(-) create mode 100644 moz-webgpu-cts/Cargo.toml rename {src/bin/moz-webgpu-cts => moz-webgpu-cts/src}/main.rs (100%) rename {src/bin/moz-webgpu-cts => moz-webgpu-cts/src}/metadata.rs (100%) rename {src/bin/moz-webgpu-cts => moz-webgpu-cts/src}/shared.rs (100%) create mode 100644 whippit/Cargo.toml rename {src => whippit/src}/lib.rs (100%) rename {src => whippit/src}/metadata.rs (100%) rename {src => whippit/src}/metadata/properties.rs (100%) rename {src => whippit/src}/metadata/properties/conditional.rs (100%) rename {src => whippit/src}/metadata/properties/conditional/expr.rs (100%) rename {src => whippit/src}/metadata/properties/unstructured.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 815f520..a0ebb9b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -484,6 +484,29 @@ dependencies = [ "adler", ] +[[package]] +name = "moz-webgpu-cts" +version = "0.2.1" +dependencies = [ + "chumsky", + "clap", + "env_logger", + "format", + "indexmap", + "insta", + "joinery", + "lets_find_up", + "log", + "miette", + "natord", + "path-dsl", + "regex", + "strum", + "thiserror", + "wax", + "whippit", +] + [[package]] name = "natord" version = "1.0.9" @@ -865,21 +888,9 @@ name = "whippit" version = "0.2.1" dependencies = [ "chumsky", - "clap", - "env_logger", "format", "indexmap", "insta", - "joinery", - "lets_find_up", - "log", - "miette", - "natord", - "path-dsl", - "regex", - "strum", - "thiserror", - "wax", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index db5f00a..4ac262f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,35 +1,17 @@ -[package] -name = "whippit" -description = "Tools and a library to work with Web Platform Tests data" -version = "0.2.1" -edition = "2021" -repository = "https://github.com/ErichDonGubler/whippit" -license = "MIT or Apache-2.0" -publish = false +[workspace] +members = [ + "moz-webgpu-cts", + "whippit", +] +resolver = "2" -[features] -default = ["unstructured-properties"] -unstructured-properties = [] - -[dependencies] +[workspace.dependencies] chumsky = { version = "1.0.0-alpha.6", features = ["label", "pratt"] } -clap = { version = "4.4.2", features = ["derive"] } -env_logger = "0.10.0" format = "0.2.4" indexmap = "2.0.0" -joinery = "3.1.0" -lets_find_up = "0.0.3" +insta = "1.33.0" log = "0.4.20" -miette = { version = "5.10.0", features = ["fancy"] } -natord = "1.0.9" -path-dsl = "0.6.1" -regex = "1.9.5" -strum = { version = "0.25.0", features = ["derive"] } thiserror = "1.0.49" -wax = "0.6.0" - -[dev-dependencies] -insta = "1.33.0" # The profile that 'cargo dist' will build with [profile.dist] diff --git a/moz-webgpu-cts/Cargo.toml b/moz-webgpu-cts/Cargo.toml new file mode 100644 index 0000000..fed691a --- /dev/null +++ b/moz-webgpu-cts/Cargo.toml @@ -0,0 +1,29 @@ +[package] +name = "moz-webgpu-cts" +description = "Tools to work with Web Platform Tests metadata for WebGPU CTS in Firefox" +version = "0.2.1" +edition = "2021" +repository = "https://github.com/ErichDonGubler/moz-webgpu-cts" +license = "MIT or Apache-2.0" +publish = false + +[dependencies] +chumsky = { workspace = true } +clap = { version = "4.4.2", features = ["derive"] } +env_logger = "0.10.0" +format = { workspace = true } +indexmap = { workspace = true } +joinery = "3.1.0" +lets_find_up = "0.0.3" +log = { workspace = true } +miette = { version = "5.10.0", features = ["fancy"] } +natord = "1.0.9" +path-dsl = "0.6.1" +regex = "1.9.5" +strum = { version = "0.25.0", features = ["derive"] } +thiserror = "1.0.49" +wax = "0.6.0" +whippit = { version = "0.2.1", path = "../whippit", default-features = false } + +[dev-dependencies] +insta = { workspace = true } diff --git a/src/bin/moz-webgpu-cts/main.rs b/moz-webgpu-cts/src/main.rs similarity index 100% rename from src/bin/moz-webgpu-cts/main.rs rename to moz-webgpu-cts/src/main.rs diff --git a/src/bin/moz-webgpu-cts/metadata.rs b/moz-webgpu-cts/src/metadata.rs similarity index 100% rename from src/bin/moz-webgpu-cts/metadata.rs rename to moz-webgpu-cts/src/metadata.rs diff --git a/src/bin/moz-webgpu-cts/shared.rs b/moz-webgpu-cts/src/shared.rs similarity index 100% rename from src/bin/moz-webgpu-cts/shared.rs rename to moz-webgpu-cts/src/shared.rs diff --git a/whippit/Cargo.toml b/whippit/Cargo.toml new file mode 100644 index 0000000..b03b89f --- /dev/null +++ b/whippit/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "whippit" +description = "Parsers for Web Platform Tests reports and metadata" +version = "0.2.1" +edition = "2021" +repository = "https://github.com/ErichDonGubler/whippit" +license = "MIT or Apache-2.0" +publish = false + +[features] +default = ["unstructured-properties"] +unstructured-properties = [] + +[dependencies] +chumsky = { workspace = true } +format = { workspace = true } +indexmap = { workspace = true } + +[dev-dependencies] +insta = { workspace = true } diff --git a/src/lib.rs b/whippit/src/lib.rs similarity index 100% rename from src/lib.rs rename to whippit/src/lib.rs diff --git a/src/metadata.rs b/whippit/src/metadata.rs similarity index 100% rename from src/metadata.rs rename to whippit/src/metadata.rs diff --git a/src/metadata/properties.rs b/whippit/src/metadata/properties.rs similarity index 100% rename from src/metadata/properties.rs rename to whippit/src/metadata/properties.rs diff --git a/src/metadata/properties/conditional.rs b/whippit/src/metadata/properties/conditional.rs similarity index 100% rename from src/metadata/properties/conditional.rs rename to whippit/src/metadata/properties/conditional.rs diff --git a/src/metadata/properties/conditional/expr.rs b/whippit/src/metadata/properties/conditional/expr.rs similarity index 100% rename from src/metadata/properties/conditional/expr.rs rename to whippit/src/metadata/properties/conditional/expr.rs diff --git a/src/metadata/properties/unstructured.rs b/whippit/src/metadata/properties/unstructured.rs similarity index 100% rename from src/metadata/properties/unstructured.rs rename to whippit/src/metadata/properties/unstructured.rs