diff --git a/Cargo.bazel.lock b/Cargo.bazel.lock index cc226a4a20e..679b602d628 100644 --- a/Cargo.bazel.lock +++ b/Cargo.bazel.lock @@ -196,6 +196,17 @@ version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c24e9d990669fbd16806bff449e4ac644fd9b1fca014760087732fe4102f131" +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + [[package]] name = "async-stream" version = "0.3.5" @@ -509,9 +520,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" dependencies = [ "clap_builder", "clap_derive", @@ -519,9 +530,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" dependencies = [ "anstream", "anstyle", @@ -529,11 +540,20 @@ dependencies = [ "strsim", ] +[[package]] +name = "clap_complete" +version = "4.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbca90c87c2a04da41e95d1856e8bcd22f159bdbfa147314d2ce5218057b0e58" +dependencies = [ + "clap", +] + [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -1012,6 +1032,7 @@ dependencies = [ "anyhow", "arrayvec", "assertables", + "async-recursion", "async-stream", "async-trait", "atomic_refcell", @@ -1020,8 +1041,10 @@ dependencies = [ "bitvec", "bmrng", "bytes", + "chrono", "ciborium", "clap", + "clap_complete", "colored", "command-fds", "coset", @@ -1041,6 +1064,7 @@ dependencies = [ "http 1.1.0", "hyper", "ignore", + "itertools 0.12.1", "lazy_static", "libloading", "libm", @@ -1061,6 +1085,7 @@ dependencies = [ "parking_lot", "pkcs8", "port_check", + "portpicker", "pprof", "primeorder", "procfs", @@ -1089,6 +1114,7 @@ dependencies = [ "static_assertions", "stderrlog", "strum", + "strum_macros 0.25.3", "subprocess", "syn 2.0.58", "syslog", @@ -1100,6 +1126,7 @@ dependencies = [ "tokio-stream", "tokio-util", "tokio-vsock", + "toml", "tonic", "tonic-build", "tonic-web", @@ -2721,6 +2748,15 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2110609fb863cdb367d4e69d6c43c81ba6a8c7d18e80082fe9f3ef16b23afeed" +[[package]] +name = "portpicker" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be97d76faf1bfab666e1375477b23fde79eccf0276e9b63b92a39d676a889ba9" +dependencies = [ + "rand", +] + [[package]] name = "postcard" version = "1.0.8" @@ -3505,18 +3541,31 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.26.2" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros 0.24.3", +] + +[[package]] +name = "strum_macros" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ - "strum_macros", + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", ] [[package]] name = "strum_macros" -version = "0.26.2" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -3766,6 +3815,7 @@ dependencies = [ "libc", "mio", "num_cpus", + "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", diff --git a/bazel/crates/oak_crates_index.bzl b/bazel/crates/oak_crates_index.bzl index f13f27c0a2f..1751dcfeeb0 100644 --- a/bazel/crates/oak_crates_index.bzl +++ b/bazel/crates/oak_crates_index.bzl @@ -73,6 +73,7 @@ def oak_crates_index(cargo_lockfile, lockfile): default_features = False, version = "*", ), + "async-recursion": crate.spec(version = "*"), "async-stream": crate.spec( version = "*", ), @@ -98,6 +99,14 @@ def oak_crates_index(cargo_lockfile, lockfile): ), "bmrng": crate.spec(version = "*"), "bytes": crate.spec(version = "*"), + "chrono": crate.spec( + default_features = False, + features = [ + "std", + "clock", + ], + version = "*", + ), "ciborium": crate.spec( default_features = False, version = "*", @@ -109,6 +118,7 @@ def oak_crates_index(cargo_lockfile, lockfile): ], version = "*", ), + "clap_complete": crate.spec(version = "*"), "colored": crate.spec(version = "*"), "command-fds": crate.spec( features = ["tokio"], @@ -178,6 +188,7 @@ def oak_crates_index(cargo_lockfile, lockfile): ), "http": crate.spec(version = "*"), "ignore": crate.spec(version = "*"), + "itertools": crate.spec(version = "*"), "lazy_static": crate.spec(version = "*"), "libloading": crate.spec(version = "*"), "libm": crate.spec(version = "*"), @@ -196,7 +207,7 @@ def oak_crates_index(cargo_lockfile, lockfile): ), "maplit": crate.spec(version = "*"), "nix": crate.spec( - features = ["user", "process"], + features = ["user", "process", "signal"], version = "*", ), "oci-spec": crate.spec(version = "*"), @@ -222,6 +233,7 @@ def oak_crates_index(cargo_lockfile, lockfile): version = "*", ), "ouroboros": crate.spec(version = "*"), + "portpicker": crate.spec(version = "*"), "p256": crate.spec( default_features = False, features = [ @@ -322,8 +334,9 @@ def oak_crates_index(cargo_lockfile, lockfile): "strum": crate.spec( default_features = False, features = ["derive"], - version = "*", + version = "0.24", ), + "strum_macros": crate.spec(version = "0.25"), "subprocess": crate.spec(version = "*"), "syn": crate.spec( features = ["full"], @@ -344,8 +357,10 @@ def oak_crates_index(cargo_lockfile, lockfile): "tokio": crate.spec( features = [ "fs", + "io-util", "macros", "net", + "parking_lot", "process", "rt-multi-thread", "signal", @@ -374,6 +389,7 @@ def oak_crates_index(cargo_lockfile, lockfile): rev = "2a52faeb4ede7d9712adbc096e547ab7ea766f4b", features = ["tonic-conn"], ), + "toml": crate.spec(version = "*"), "tonic": crate.spec(version = "*"), "tonic-build": crate.spec(version = "*"), "tonic-web": crate.spec(version = "*"), diff --git a/bazel/test_workspace/Cargo-test.bazel.lock b/bazel/test_workspace/Cargo-test.bazel.lock index 8d36b44b2a4..a5947773d73 100644 --- a/bazel/test_workspace/Cargo-test.bazel.lock +++ b/bazel/test_workspace/Cargo-test.bazel.lock @@ -205,6 +205,17 @@ version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c24e9d990669fbd16806bff449e4ac644fd9b1fca014760087732fe4102f131" +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "async-stream" version = "0.3.5" @@ -524,9 +535,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" dependencies = [ "clap_builder", "clap_derive", @@ -534,9 +545,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" dependencies = [ "anstream", "anstyle", @@ -544,11 +555,20 @@ dependencies = [ "strsim", ] +[[package]] +name = "clap_complete" +version = "4.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbca90c87c2a04da41e95d1856e8bcd22f159bdbfa147314d2ce5218057b0e58" +dependencies = [ + "clap", +] + [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -1027,6 +1047,7 @@ dependencies = [ "anyhow", "arrayvec", "assertables", + "async-recursion", "async-stream", "async-trait", "atomic_refcell", @@ -1035,8 +1056,10 @@ dependencies = [ "bitvec", "bmrng", "bytes", + "chrono", "ciborium", "clap", + "clap_complete", "colored", "command-fds", "coset", @@ -1056,6 +1079,7 @@ dependencies = [ "http 1.1.0", "hyper", "ignore", + "itertools 0.12.1", "lazy_static", "libloading", "libm", @@ -1076,6 +1100,7 @@ dependencies = [ "parking_lot", "pkcs8", "port_check", + "portpicker", "pprof", "primeorder", "procfs", @@ -1104,6 +1129,7 @@ dependencies = [ "static_assertions", "stderrlog", "strum", + "strum_macros 0.25.3", "subprocess", "syn 2.0.66", "syslog", @@ -1115,6 +1141,7 @@ dependencies = [ "tokio-stream", "tokio-util", "tokio-vsock", + "toml", "tonic", "tonic-build", "tonic-web", @@ -2745,6 +2772,15 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2110609fb863cdb367d4e69d6c43c81ba6a8c7d18e80082fe9f3ef16b23afeed" +[[package]] +name = "portpicker" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be97d76faf1bfab666e1375477b23fde79eccf0276e9b63b92a39d676a889ba9" +dependencies = [ + "rand", +] + [[package]] name = "postcard" version = "1.0.8" @@ -3528,18 +3564,31 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.26.2" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros 0.24.3", +] + +[[package]] +name = "strum_macros" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ - "strum_macros", + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", ] [[package]] name = "strum_macros" -version = "0.26.2" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -3789,6 +3838,7 @@ dependencies = [ "libc", "mio", "num_cpus", + "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", diff --git a/bazel/test_workspace/cargo-bazel-test-lock.json b/bazel/test_workspace/cargo-bazel-test-lock.json index 9f0a5f97600..49f8f927a70 100644 --- a/bazel/test_workspace/cargo-bazel-test-lock.json +++ b/bazel/test_workspace/cargo-bazel-test-lock.json @@ -1,5 +1,5 @@ { - "checksum": "cca2efc80e2a467536a56843972657b338903d80badb2d338265c91d6a47a366", + "checksum": "13cbf93a967d0d7071a4377e4650a20e26dafe53334cee994e5c5b8a091219b5", "crates": { "acpi 5.0.0": { "name": "acpi", @@ -1261,6 +1261,62 @@ ], "license_file": "LICENSE.md" }, + "async-recursion 1.1.1": { + "name": "async-recursion", + "version": "1.1.1", + "package_url": "https://github.com/dcchut/async-recursion", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/async-recursion/1.1.1/download", + "sha256": "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" + } + }, + "targets": [ + { + "ProcMacro": { + "crate_name": "async_recursion", + "crate_root": "src/lib.rs", + "srcs": { + "allow_empty": false, + "include": [ + "**/*.rs" + ] + } + } + } + ], + "library_target_name": "async_recursion", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.84", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.36", + "target": "quote" + }, + { + "id": "syn 2.0.66", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.1.1" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": "LICENSE-APACHE" + }, "async-stream 0.3.5": { "name": "async-stream", "version": "0.3.5", @@ -3230,14 +3286,14 @@ ], "license_file": "LICENSE-APACHE" }, - "clap 4.5.4": { + "clap 4.5.7": { "name": "clap", - "version": "4.5.4", + "version": "4.5.7", "package_url": "https://github.com/clap-rs/clap", "repository": { "Http": { - "url": "https://static.crates.io/crates/clap/4.5.4/download", - "sha256": "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" + "url": "https://static.crates.io/crates/clap/4.5.7/download", + "sha256": "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" } }, "targets": [ @@ -3276,7 +3332,7 @@ "deps": { "common": [ { - "id": "clap_builder 4.5.2", + "id": "clap_builder 4.5.7", "target": "clap_builder" } ], @@ -3286,13 +3342,13 @@ "proc_macro_deps": { "common": [ { - "id": "clap_derive 4.5.4", + "id": "clap_derive 4.5.5", "target": "clap_derive" } ], "selects": {} }, - "version": "4.5.4" + "version": "4.5.7" }, "license": "MIT OR Apache-2.0", "license_ids": [ @@ -3301,14 +3357,14 @@ ], "license_file": "LICENSE-APACHE" }, - "clap_builder 4.5.2": { + "clap_builder 4.5.7": { "name": "clap_builder", - "version": "4.5.2", + "version": "4.5.7", "package_url": "https://github.com/clap-rs/clap", "repository": { "Http": { - "url": "https://static.crates.io/crates/clap_builder/4.5.2/download", - "sha256": "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" + "url": "https://static.crates.io/crates/clap_builder/4.5.7/download", + "sha256": "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" } }, "targets": [ @@ -3364,7 +3420,7 @@ "selects": {} }, "edition": "2021", - "version": "4.5.2" + "version": "4.5.7" }, "license": "MIT OR Apache-2.0", "license_ids": [ @@ -3373,14 +3429,68 @@ ], "license_file": "LICENSE-APACHE" }, - "clap_derive 4.5.4": { + "clap_complete 4.5.6": { + "name": "clap_complete", + "version": "4.5.6", + "package_url": "https://github.com/clap-rs/clap", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/clap_complete/4.5.6/download", + "sha256": "fbca90c87c2a04da41e95d1856e8bcd22f159bdbfa147314d2ce5218057b0e58" + } + }, + "targets": [ + { + "Library": { + "crate_name": "clap_complete", + "crate_root": "src/lib.rs", + "srcs": { + "allow_empty": false, + "include": [ + "**/*.rs" + ] + } + } + } + ], + "library_target_name": "clap_complete", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "clap 4.5.7", + "target": "clap" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "4.5.6" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": "LICENSE-APACHE" + }, + "clap_derive 4.5.5": { "name": "clap_derive", - "version": "4.5.4", - "package_url": "https://github.com/clap-rs/clap/tree/master/clap_derive", + "version": "4.5.5", + "package_url": "https://github.com/clap-rs/clap", "repository": { "Http": { - "url": "https://static.crates.io/crates/clap_derive/4.5.4/download", - "sha256": "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" + "url": "https://static.crates.io/crates/clap_derive/4.5.5/download", + "sha256": "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" } }, "targets": [ @@ -3430,7 +3540,7 @@ "selects": {} }, "edition": "2021", - "version": "4.5.4" + "version": "4.5.5" }, "license": "MIT OR Apache-2.0", "license_ids": [ @@ -4761,7 +4871,7 @@ "target": "ciborium" }, { - "id": "clap 4.5.4", + "id": "clap 4.5.7", "target": "clap" }, { @@ -6308,14 +6418,22 @@ "id": "bytes 1.6.0", "target": "bytes" }, + { + "id": "chrono 0.4.38", + "target": "chrono" + }, { "id": "ciborium 0.2.2", "target": "ciborium" }, { - "id": "clap 4.5.4", + "id": "clap 4.5.7", "target": "clap" }, + { + "id": "clap_complete 4.5.6", + "target": "clap_complete" + }, { "id": "colored 2.1.0", "target": "colored" @@ -6388,6 +6506,10 @@ "id": "ignore 0.4.22", "target": "ignore" }, + { + "id": "itertools 0.12.1", + "target": "itertools" + }, { "id": "lazy_static 1.4.0", "target": "lazy_static" @@ -6468,6 +6590,10 @@ "id": "port_check 0.2.1", "target": "port_check" }, + { + "id": "portpicker 0.1.1", + "target": "portpicker" + }, { "id": "pprof 0.13.0", "target": "pprof" @@ -6573,7 +6699,7 @@ "target": "stderrlog" }, { - "id": "strum 0.26.2", + "id": "strum 0.24.1", "target": "strum" }, { @@ -6620,6 +6746,10 @@ "id": "tokio-vsock 0.5.0", "target": "tokio_vsock" }, + { + "id": "toml 0.8.14", + "target": "toml" + }, { "id": "tonic 0.11.0", "target": "tonic" @@ -6694,6 +6824,10 @@ "edition": "2018", "proc_macro_deps": { "common": [ + { + "id": "async-recursion 1.1.1", + "target": "async_recursion" + }, { "id": "async-trait 0.1.80", "target": "async_trait" @@ -6705,6 +6839,10 @@ { "id": "prost-derive 0.12.6", "target": "prost_derive" + }, + { + "id": "strum_macros 0.25.3", + "target": "strum_macros" } ], "selects": {} @@ -13843,6 +13981,7 @@ "default", "feature", "process", + "signal", "user" ], "selects": {} @@ -16628,6 +16767,53 @@ ], "license_file": "LICENSE" }, + "portpicker 0.1.1": { + "name": "portpicker", + "version": "0.1.1", + "package_url": "https://github.com/Dentosal/portpicker-rs", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/portpicker/0.1.1/download", + "sha256": "be97d76faf1bfab666e1375477b23fde79eccf0276e9b63b92a39d676a889ba9" + } + }, + "targets": [ + { + "Library": { + "crate_name": "portpicker", + "crate_root": "src/lib.rs", + "srcs": { + "allow_empty": false, + "include": [ + "**/*.rs" + ] + } + } + } + ], + "library_target_name": "portpicker", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "rand 0.8.5", + "target": "rand" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.1" + }, + "license": "Unlicense", + "license_ids": [ + "Unlicense" + ], + "license_file": "LICENSE" + }, "postcard 1.0.8": { "name": "postcard", "version": "1.0.8", @@ -21561,14 +21747,14 @@ ], "license_file": "LICENSE" }, - "strum 0.26.2": { + "strum 0.24.1": { "name": "strum", - "version": "0.26.2", + "version": "0.24.1", "package_url": "https://github.com/Peternator7/strum", "repository": { "Http": { - "url": "https://static.crates.io/crates/strum/0.26.2/download", - "sha256": "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" + "url": "https://static.crates.io/crates/strum/0.24.1/download", + "sha256": "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" } }, "targets": [ @@ -21601,13 +21787,13 @@ "proc_macro_deps": { "common": [ { - "id": "strum_macros 0.26.2", + "id": "strum_macros 0.24.3", "target": "strum_macros" } ], "selects": {} }, - "version": "0.26.2" + "version": "0.24.1" }, "license": "MIT", "license_ids": [ @@ -21615,14 +21801,82 @@ ], "license_file": "LICENSE" }, - "strum_macros 0.26.2": { + "strum_macros 0.24.3": { "name": "strum_macros", - "version": "0.26.2", + "version": "0.24.3", "package_url": "https://github.com/Peternator7/strum", "repository": { "Http": { - "url": "https://static.crates.io/crates/strum_macros/0.26.2/download", - "sha256": "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" + "url": "https://static.crates.io/crates/strum_macros/0.24.3/download", + "sha256": "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" + } + }, + "targets": [ + { + "ProcMacro": { + "crate_name": "strum_macros", + "crate_root": "src/lib.rs", + "srcs": { + "allow_empty": false, + "include": [ + "**/*.rs" + ] + } + } + } + ], + "library_target_name": "strum_macros", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "heck 0.4.1", + "target": "heck" + }, + { + "id": "proc-macro2 1.0.84", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.36", + "target": "quote" + }, + { + "id": "syn 1.0.109", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2018", + "proc_macro_deps": { + "common": [ + { + "id": "rustversion 1.0.17", + "target": "rustversion" + } + ], + "selects": {} + }, + "version": "0.24.3" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": "LICENSE" + }, + "strum_macros 0.25.3": { + "name": "strum_macros", + "version": "0.25.3", + "package_url": "https://github.com/Peternator7/strum", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/strum_macros/0.25.3/download", + "sha256": "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" } }, "targets": [ @@ -21675,7 +21929,7 @@ ], "selects": {} }, - "version": "0.26.2" + "version": "0.25.3" }, "license": "MIT", "license_ids": [ @@ -22042,6 +22296,7 @@ "clone-impls", "default", "derive", + "extra-traits", "parsing", "printing", "proc-macro", @@ -23189,6 +23444,7 @@ "mio", "net", "num_cpus", + "parking_lot", "process", "rt", "rt-multi-thread", @@ -23215,6 +23471,10 @@ "id": "num_cpus 1.16.0", "target": "num_cpus" }, + { + "id": "parking_lot 0.12.3", + "target": "parking_lot" + }, { "id": "pin-project-lite 0.2.14", "target": "pin_project_lite" @@ -30791,6 +31051,7 @@ "anyhow 1.0.86", "arrayvec 0.7.4", "assertables 7.0.1", + "async-recursion 1.1.1", "async-stream 0.3.5", "async-trait 0.1.80", "atomic_refcell 0.1.13", @@ -30799,8 +31060,10 @@ "bitvec 1.0.1", "bmrng 0.5.2", "bytes 1.6.0", + "chrono 0.4.38", "ciborium 0.2.2", - "clap 4.5.4", + "clap 4.5.7", + "clap_complete 4.5.6", "colored 2.1.0", "command-fds 0.3.0", "coset 0.3.7", @@ -30820,6 +31083,7 @@ "http 1.1.0", "hyper 0.14.28", "ignore 0.4.22", + "itertools 0.12.1", "lazy_static 1.4.0", "libloading 0.8.4", "libm 0.2.8", @@ -30840,6 +31104,7 @@ "parking_lot 0.12.3", "pkcs8 0.10.2", "port_check 0.2.1", + "portpicker 0.1.1", "pprof 0.13.0", "primeorder 0.13.6", "procfs 0.16.0", @@ -30867,7 +31132,8 @@ "spinning_top 0.3.0", "static_assertions 1.1.0", "stderrlog 0.6.0", - "strum 0.26.2", + "strum 0.24.1", + "strum_macros 0.25.3", "subprocess 0.2.9", "syn 2.0.66", "syslog 6.1.1", @@ -30879,6 +31145,7 @@ "tokio-stream 0.1.15", "tokio-util 0.7.11", "tokio-vsock 0.5.0", + "toml 0.8.14", "tonic 0.11.0", "tonic-build 0.11.0", "tonic-web 0.11.0", diff --git a/cargo-bazel-lock.json b/cargo-bazel-lock.json index 6a39d329850..85b7e0ecad3 100644 --- a/cargo-bazel-lock.json +++ b/cargo-bazel-lock.json @@ -1,5 +1,5 @@ { - "checksum": "adaa541bd76e7b9963a9b6319b98ca0f365d0434d761514dca126d01cf7a66e4", + "checksum": "35fe9d53b25745f64ea742d9641e29424bab2fd00c38ed9ebeb45ac2a408e15d", "crates": { "acpi 5.0.0": { "name": "acpi", @@ -1213,6 +1213,62 @@ ], "license_file": "LICENSE.md" }, + "async-recursion 1.1.1": { + "name": "async-recursion", + "version": "1.1.1", + "package_url": "https://github.com/dcchut/async-recursion", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/async-recursion/1.1.1/download", + "sha256": "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" + } + }, + "targets": [ + { + "ProcMacro": { + "crate_name": "async_recursion", + "crate_root": "src/lib.rs", + "srcs": { + "allow_empty": false, + "include": [ + "**/*.rs" + ] + } + } + } + ], + "library_target_name": "async_recursion", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.79", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.35", + "target": "quote" + }, + { + "id": "syn 2.0.58", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.1.1" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": "LICENSE-APACHE" + }, "async-stream 0.3.5": { "name": "async-stream", "version": "0.3.5", @@ -3165,14 +3221,14 @@ ], "license_file": "LICENSE-APACHE" }, - "clap 4.5.4": { + "clap 4.5.7": { "name": "clap", - "version": "4.5.4", + "version": "4.5.7", "package_url": "https://github.com/clap-rs/clap", "repository": { "Http": { - "url": "https://static.crates.io/crates/clap/4.5.4/download", - "sha256": "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" + "url": "https://static.crates.io/crates/clap/4.5.7/download", + "sha256": "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" } }, "targets": [ @@ -3211,7 +3267,7 @@ "deps": { "common": [ { - "id": "clap_builder 4.5.2", + "id": "clap_builder 4.5.7", "target": "clap_builder" } ], @@ -3221,13 +3277,13 @@ "proc_macro_deps": { "common": [ { - "id": "clap_derive 4.5.4", + "id": "clap_derive 4.5.5", "target": "clap_derive" } ], "selects": {} }, - "version": "4.5.4" + "version": "4.5.7" }, "license": "MIT OR Apache-2.0", "license_ids": [ @@ -3236,14 +3292,14 @@ ], "license_file": "LICENSE-APACHE" }, - "clap_builder 4.5.2": { + "clap_builder 4.5.7": { "name": "clap_builder", - "version": "4.5.2", + "version": "4.5.7", "package_url": "https://github.com/clap-rs/clap", "repository": { "Http": { - "url": "https://static.crates.io/crates/clap_builder/4.5.2/download", - "sha256": "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" + "url": "https://static.crates.io/crates/clap_builder/4.5.7/download", + "sha256": "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" } }, "targets": [ @@ -3299,7 +3355,7 @@ "selects": {} }, "edition": "2021", - "version": "4.5.2" + "version": "4.5.7" }, "license": "MIT OR Apache-2.0", "license_ids": [ @@ -3308,14 +3364,68 @@ ], "license_file": "LICENSE-APACHE" }, - "clap_derive 4.5.4": { + "clap_complete 4.5.6": { + "name": "clap_complete", + "version": "4.5.6", + "package_url": "https://github.com/clap-rs/clap", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/clap_complete/4.5.6/download", + "sha256": "fbca90c87c2a04da41e95d1856e8bcd22f159bdbfa147314d2ce5218057b0e58" + } + }, + "targets": [ + { + "Library": { + "crate_name": "clap_complete", + "crate_root": "src/lib.rs", + "srcs": { + "allow_empty": false, + "include": [ + "**/*.rs" + ] + } + } + } + ], + "library_target_name": "clap_complete", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "clap 4.5.7", + "target": "clap" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "4.5.6" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": "LICENSE-APACHE" + }, + "clap_derive 4.5.5": { "name": "clap_derive", - "version": "4.5.4", - "package_url": "https://github.com/clap-rs/clap/tree/master/clap_derive", + "version": "4.5.5", + "package_url": "https://github.com/clap-rs/clap", "repository": { "Http": { - "url": "https://static.crates.io/crates/clap_derive/4.5.4/download", - "sha256": "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" + "url": "https://static.crates.io/crates/clap_derive/4.5.5/download", + "sha256": "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" } }, "targets": [ @@ -3365,7 +3475,7 @@ "selects": {} }, "edition": "2021", - "version": "4.5.4" + "version": "4.5.5" }, "license": "MIT OR Apache-2.0", "license_ids": [ @@ -4717,7 +4827,7 @@ "target": "ciborium" }, { - "id": "clap 4.5.4", + "id": "clap 4.5.7", "target": "clap" }, { @@ -6264,14 +6374,22 @@ "id": "bytes 1.6.0", "target": "bytes" }, + { + "id": "chrono 0.4.38", + "target": "chrono" + }, { "id": "ciborium 0.2.2", "target": "ciborium" }, { - "id": "clap 4.5.4", + "id": "clap 4.5.7", "target": "clap" }, + { + "id": "clap_complete 4.5.6", + "target": "clap_complete" + }, { "id": "colored 2.1.0", "target": "colored" @@ -6344,6 +6462,10 @@ "id": "ignore 0.4.22", "target": "ignore" }, + { + "id": "itertools 0.12.1", + "target": "itertools" + }, { "id": "lazy_static 1.4.0", "target": "lazy_static" @@ -6424,6 +6546,10 @@ "id": "port_check 0.2.1", "target": "port_check" }, + { + "id": "portpicker 0.1.1", + "target": "portpicker" + }, { "id": "pprof 0.13.0", "target": "pprof" @@ -6529,7 +6655,7 @@ "target": "stderrlog" }, { - "id": "strum 0.26.2", + "id": "strum 0.24.1", "target": "strum" }, { @@ -6576,6 +6702,10 @@ "id": "tokio-vsock 0.5.0", "target": "tokio_vsock" }, + { + "id": "toml 0.8.14", + "target": "toml" + }, { "id": "tonic 0.11.0", "target": "tonic" @@ -6650,6 +6780,10 @@ "edition": "2018", "proc_macro_deps": { "common": [ + { + "id": "async-recursion 1.1.1", + "target": "async_recursion" + }, { "id": "async-trait 0.1.79", "target": "async_trait" @@ -6661,6 +6795,10 @@ { "id": "prost-derive 0.12.4", "target": "prost_derive" + }, + { + "id": "strum_macros 0.25.3", + "target": "strum_macros" } ], "selects": {} @@ -13711,6 +13849,7 @@ "ioctl", "memoffset", "process", + "signal", "socket", "user" ], @@ -16501,6 +16640,53 @@ ], "license_file": "LICENSE" }, + "portpicker 0.1.1": { + "name": "portpicker", + "version": "0.1.1", + "package_url": "https://github.com/Dentosal/portpicker-rs", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/portpicker/0.1.1/download", + "sha256": "be97d76faf1bfab666e1375477b23fde79eccf0276e9b63b92a39d676a889ba9" + } + }, + "targets": [ + { + "Library": { + "crate_name": "portpicker", + "crate_root": "src/lib.rs", + "srcs": { + "allow_empty": false, + "include": [ + "**/*.rs" + ] + } + } + } + ], + "library_target_name": "portpicker", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "rand 0.8.5", + "target": "rand" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.1" + }, + "license": "Unlicense", + "license_ids": [ + "Unlicense" + ], + "license_file": "LICENSE" + }, "postcard 1.0.8": { "name": "postcard", "version": "1.0.8", @@ -21439,14 +21625,14 @@ ], "license_file": "LICENSE" }, - "strum 0.26.2": { + "strum 0.24.1": { "name": "strum", - "version": "0.26.2", + "version": "0.24.1", "package_url": "https://github.com/Peternator7/strum", "repository": { "Http": { - "url": "https://static.crates.io/crates/strum/0.26.2/download", - "sha256": "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" + "url": "https://static.crates.io/crates/strum/0.24.1/download", + "sha256": "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" } }, "targets": [ @@ -21479,13 +21665,13 @@ "proc_macro_deps": { "common": [ { - "id": "strum_macros 0.26.2", + "id": "strum_macros 0.24.3", "target": "strum_macros" } ], "selects": {} }, - "version": "0.26.2" + "version": "0.24.1" }, "license": "MIT", "license_ids": [ @@ -21493,14 +21679,82 @@ ], "license_file": "LICENSE" }, - "strum_macros 0.26.2": { + "strum_macros 0.24.3": { "name": "strum_macros", - "version": "0.26.2", + "version": "0.24.3", "package_url": "https://github.com/Peternator7/strum", "repository": { "Http": { - "url": "https://static.crates.io/crates/strum_macros/0.26.2/download", - "sha256": "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" + "url": "https://static.crates.io/crates/strum_macros/0.24.3/download", + "sha256": "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" + } + }, + "targets": [ + { + "ProcMacro": { + "crate_name": "strum_macros", + "crate_root": "src/lib.rs", + "srcs": { + "allow_empty": false, + "include": [ + "**/*.rs" + ] + } + } + } + ], + "library_target_name": "strum_macros", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "heck 0.4.1", + "target": "heck" + }, + { + "id": "proc-macro2 1.0.79", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.35", + "target": "quote" + }, + { + "id": "syn 1.0.109", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2018", + "proc_macro_deps": { + "common": [ + { + "id": "rustversion 1.0.14", + "target": "rustversion" + } + ], + "selects": {} + }, + "version": "0.24.3" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": "LICENSE" + }, + "strum_macros 0.25.3": { + "name": "strum_macros", + "version": "0.25.3", + "package_url": "https://github.com/Peternator7/strum", + "repository": { + "Http": { + "url": "https://static.crates.io/crates/strum_macros/0.25.3/download", + "sha256": "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" } }, "targets": [ @@ -21553,7 +21807,7 @@ ], "selects": {} }, - "version": "0.26.2" + "version": "0.25.3" }, "license": "MIT", "license_ids": [ @@ -21920,6 +22174,7 @@ "clone-impls", "default", "derive", + "extra-traits", "parsing", "printing", "proc-macro", @@ -23067,6 +23322,7 @@ "mio", "net", "num_cpus", + "parking_lot", "process", "rt", "rt-multi-thread", @@ -23093,6 +23349,10 @@ "id": "num_cpus 1.16.0", "target": "num_cpus" }, + { + "id": "parking_lot 0.12.3", + "target": "parking_lot" + }, { "id": "pin-project-lite 0.2.14", "target": "pin_project_lite" @@ -30552,6 +30812,7 @@ "anyhow 1.0.81", "arrayvec 0.7.4", "assertables 7.0.1", + "async-recursion 1.1.1", "async-stream 0.3.5", "async-trait 0.1.79", "atomic_refcell 0.1.13", @@ -30560,8 +30821,10 @@ "bitvec 1.0.1", "bmrng 0.5.2", "bytes 1.6.0", + "chrono 0.4.38", "ciborium 0.2.2", - "clap 4.5.4", + "clap 4.5.7", + "clap_complete 4.5.6", "colored 2.1.0", "command-fds 0.3.0", "coset 0.3.7", @@ -30581,6 +30844,7 @@ "http 1.1.0", "hyper 0.14.28", "ignore 0.4.22", + "itertools 0.12.1", "lazy_static 1.4.0", "libloading 0.8.4", "libm 0.2.8", @@ -30601,6 +30865,7 @@ "parking_lot 0.12.3", "pkcs8 0.10.2", "port_check 0.2.1", + "portpicker 0.1.1", "pprof 0.13.0", "primeorder 0.13.6", "procfs 0.16.0", @@ -30628,7 +30893,8 @@ "spinning_top 0.3.0", "static_assertions 1.1.0", "stderrlog 0.6.0", - "strum 0.26.2", + "strum 0.24.1", + "strum_macros 0.25.3", "subprocess 0.2.9", "syn 2.0.58", "syslog 6.1.1", @@ -30640,6 +30906,7 @@ "tokio-stream 0.1.15", "tokio-util 0.7.11", "tokio-vsock 0.5.0", + "toml 0.8.14", "tonic 0.11.0", "tonic-build 0.11.0", "tonic-web 0.11.0", diff --git a/xtask/BUILD b/xtask/BUILD new file mode 100644 index 00000000000..7d17263813a --- /dev/null +++ b/xtask/BUILD @@ -0,0 +1,71 @@ +# +# Copyright 2024 The Project Oak Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library") + +package( + default_visibility = ["//visibility:public"], + licenses = ["notice"], +) + +rust_library( + name = "lib", + srcs = glob( + ["src/*.rs"], + exclude = ["src/main.rs"], + ), + crate_features = ["bazel"], + crate_name = "xtask", + proc_macro_deps = [ + "@oak_crates_index//:async-trait", + "@oak_crates_index//:async-recursion", + "@oak_crates_index//:strum_macros", + ], + rustc_env = { + "WORKSPACE_ROOT": ".", + }, + deps = [ + "@oak_crates_index//:chrono", + "@oak_crates_index//:clap", + "@oak_crates_index//:clap_complete", + "@oak_crates_index//:colored", + "@oak_crates_index//:itertools", + "@oak_crates_index//:nix", + "@oak_crates_index//:once_cell", + "@oak_crates_index//:portpicker", + "@oak_crates_index//:regex", + "@oak_crates_index//:serde", + "@oak_crates_index//:strum", + "@oak_crates_index//:tokio", + "@oak_crates_index//:toml", + "@oak_crates_index//:walkdir", + "@oak_crates_index//:which", + ], +) + +# TODO(b/330178457) Swap ./script to use Bazel. +rust_binary( + name = "xtask", + srcs = ["src/main.rs"], + deps = [ + ":lib", + "@oak_crates_index//:clap", + "@oak_crates_index//:clap_complete", + "@oak_crates_index//:colored", + "@oak_crates_index//:tokio", + "@oak_crates_index//:toml", + ], +)