From 36a95d2d615c3ea361c2b3b2188c06611110ff81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Thu, 10 Jul 2025 17:55:14 +0200 Subject: [PATCH 1/8] Bump the version of the sys crate to 0.1.0-rc.1+2.4.4 and put it on workspace dependency --- Cargo.lock | 369 +++++++++++++++++------------- Cargo.toml | 4 +- wslplugins-macro-core/Cargo.toml | 4 +- wslplugins-macro-tests/Cargo.toml | 5 +- wslplugins-rs/Cargo.toml | 3 +- 5 files changed, 220 insertions(+), 165 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a03b81c..22d3a5b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - [[package]] name = "android-tzdata" version = "0.1.1" @@ -27,30 +18,16 @@ dependencies = [ ] [[package]] -name = "autocfg" -version = "1.3.0" +name = "anyhow" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" [[package]] -name = "bindgen" -version = "0.71.1" +name = "autocfg" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "itertools", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn", -] +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "bitflags" @@ -58,6 +35,15 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + [[package]] name = "bumpalo" version = "3.16.0" @@ -70,15 +56,6 @@ version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292" -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfg-if" version = "1.0.0" @@ -100,27 +77,45 @@ dependencies = [ ] [[package]] -name = "clang-sys" -version = "1.8.1" +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cow-utils" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "417bef24afe1460300965a25ff4a24b8b45ad011948302ec221e8a0a81eb2c79" + +[[package]] +name = "cpufeatures" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ - "glob", "libc", - "libloading", ] [[package]] -name = "core-foundation-sys" -version = "0.8.7" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] [[package]] -name = "either" -version = "1.13.0" +name = "digest" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] [[package]] name = "enumflags2" @@ -173,6 +168,16 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3ea1ec5f8307826a5b71094dd91fc04d4ae75d5709b20ad351c7fb4815c86ec" +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + [[package]] name = "glob" version = "0.3.1" @@ -191,6 +196,12 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + [[package]] name = "iana-time-zone" version = "0.1.60" @@ -224,15 +235,6 @@ dependencies = [ "hashbrown", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.11" @@ -254,16 +256,6 @@ version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" -[[package]] -name = "libloading" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" -dependencies = [ - "cfg-if", - "windows-targets", -] - [[package]] name = "log" version = "0.4.22" @@ -297,22 +289,6 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -337,20 +313,10 @@ dependencies = [ "fern", "log", "log-instrument", - "windows", + "windows 0.58.0", "wslplugins-rs", ] -[[package]] -name = "prettyplease" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" -dependencies = [ - "proc-macro2", - "syn", -] - [[package]] name = "proc-macro2" version = "1.0.92" @@ -369,41 +335,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "regex" -version = "1.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" - -[[package]] -name = "rustc-hash" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" - [[package]] name = "rustversion" version = "1.0.17" @@ -464,10 +395,15 @@ dependencies = [ ] [[package]] -name = "shlex" -version = "1.3.0" +name = "sha2" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] [[package]] name = "struct-field-names-as-array" @@ -625,12 +561,24 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04645b6c01cfb2ddabffc7c67ae6bfe7c3e28a5c37d729f6bb498e784f1fd70c" +[[package]] +name = "typenum" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" + [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + [[package]] name = "wasm-bindgen" version = "0.2.92" @@ -710,6 +658,28 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "windows" +version = "0.61.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +dependencies = [ + "windows-collections", + "windows-core 0.61.2", + "windows-future", + "windows-link", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core 0.61.2", +] + [[package]] name = "windows-core" version = "0.52.0" @@ -725,13 +695,37 @@ version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" dependencies = [ - "windows-implement", - "windows-interface", - "windows-result", - "windows-strings", + "windows-implement 0.58.0", + "windows-interface 0.58.0", + "windows-result 0.2.0", + "windows-strings 0.1.0", "windows-targets", ] +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement 0.60.0", + "windows-interface 0.59.1", + "windows-link", + "windows-result 0.3.4", + "windows-strings 0.4.2", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core 0.61.2", + "windows-link", + "windows-threading", +] + [[package]] name = "windows-implement" version = "0.58.0" @@ -743,6 +737,17 @@ dependencies = [ "syn", ] +[[package]] +name = "windows-implement" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "windows-interface" version = "0.58.0" @@ -754,6 +759,33 @@ dependencies = [ "syn", ] +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core 0.61.2", + "windows-link", +] + [[package]] name = "windows-result" version = "0.2.0" @@ -763,16 +795,34 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link", +] + [[package]] name = "windows-strings" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "windows-result", + "windows-result 0.2.0", "windows-targets", ] +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link", +] + [[package]] name = "windows-sys" version = "0.59.0" @@ -798,6 +848,15 @@ dependencies = [ "windows_x86_64_msvc", ] +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -857,25 +916,19 @@ dependencies = [ [[package]] name = "wslpluginapi-sys" -version = "0.1.0-alpha.0+2.1.3" -source = "git+https://github.com/mveril/wslpluginapi-sys.git?branch=main#19cb304cb9c76df2fb27a3d601a6872c3bb4f414" +version = "0.1.0-rc.1+2.4.4" +source = "git+https://github.com/mveril/wslpluginapi-sys.git?branch=release%2F0.1.0-rc.1%2B2.4.4#22a9877a9da046fadc9e9a5147cb1b654136a7f5" dependencies = [ - "bindgen", - "libc", - "semver", - "windows", -] - -[[package]] -name = "wslpluginapi-sys" -version = "0.1.0-beta.1+2.1.3" -source = "git+https://github.com/mveril/wslpluginapi-sys.git?branch=release%2F0.1-beta.1%2B2.1.3#fa440569d606f09abda74d94b41644f9931bd023" -dependencies = [ - "bindgen", + "anyhow", + "cow-utils", + "hex", "libc", "semver", + "serde", + "serde_json", + "sha2", "struct-field-names-as-array", - "windows", + "windows 0.58.0", ] [[package]] @@ -898,7 +951,7 @@ dependencies = [ "struct-field-names-as-array", "strum", "syn", - "wslpluginapi-sys 0.1.0-beta.1+2.1.3", + "wslpluginapi-sys", ] [[package]] @@ -906,8 +959,8 @@ name = "wslplugins-macro-tests" version = "0.1.0-alpha.0" dependencies = [ "trybuild", - "windows", - "wslpluginapi-sys 0.1.0-alpha.0+2.1.3", + "windows 0.61.3", + "wslpluginapi-sys", "wslplugins-rs", ] @@ -924,7 +977,7 @@ dependencies = [ "thiserror 2.0.7", "typed-path", "widestring", - "windows", - "wslpluginapi-sys 0.1.0-beta.1+2.1.3", + "windows 0.58.0", + "wslpluginapi-sys", "wslplugins-macro", ] diff --git a/Cargo.toml b/Cargo.toml index 6c9a344..da21b05 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,8 @@ members = [ "wslplugins-macro-core", "wslplugins-macro-tests", ] +[workspace.dependencies] +wslpluginapi-sys = "0.1.0-rc.1" [workspace.package] authors = ["Mickaël Véril "] @@ -17,4 +19,4 @@ repository = "https://github.com/mveril/wslplugins-rs" description = "A Rust framework for developing WSL plugins using safe and idiomatic Rust." [patch.crates-io] -wslpluginapi-sys = { git = "https://github.com/mveril/wslpluginapi-sys.git", branch = "release/0.1-beta.1+2.1.3" } +wslpluginapi-sys = { version = "0.1.0-rc.1", git = "https://github.com/mveril/wslpluginapi-sys.git", branch = "release/0.1.0-rc.1+2.4.4" } diff --git a/wslplugins-macro-core/Cargo.toml b/wslplugins-macro-core/Cargo.toml index 40ac10b..b09a28c 100644 --- a/wslplugins-macro-core/Cargo.toml +++ b/wslplugins-macro-core/Cargo.toml @@ -14,8 +14,6 @@ heck = "0.5" strum = { version = "0.26.3", features = ["derive"] } [build-dependencies] -wslpluginapi-sys = { version = "0.1.0-beta.1+2.1.3", features = [ - "hooks-field-names", -] } +wslpluginapi-sys = { workspace = true, features = ["hooks-field-names"] } quote = "*" struct-field-names-as-array = "*" diff --git a/wslplugins-macro-tests/Cargo.toml b/wslplugins-macro-tests/Cargo.toml index d77e33a..414014a 100644 --- a/wslplugins-macro-tests/Cargo.toml +++ b/wslplugins-macro-tests/Cargo.toml @@ -10,9 +10,10 @@ publish = false [dependencies] wslplugins-rs = { path = "../wslplugins-rs", features = ["macro"] } -wslpluginapi-sys = { git = "https://github.com/mveril/wslpluginapi-sys.git", branch = "main" } +wslpluginapi-sys.workspace = true + [dependencies.windows] -version = "0.58" +version = "0.61" features = ["Win32_Foundation"] [dev-dependencies] diff --git a/wslplugins-rs/Cargo.toml b/wslplugins-rs/Cargo.toml index 462492d..0020b1e 100644 --- a/wslplugins-rs/Cargo.toml +++ b/wslplugins-rs/Cargo.toml @@ -21,11 +21,12 @@ thiserror = "2.0.7" typed-path = ">0.1" widestring = { version = "1", features = ["alloc"] } wslplugins-macro = { path = "../wslplugins-macro", optional = true } -wslpluginapi-sys = "0.1.0-beta.1+2.1.3" +wslpluginapi-sys.workspace = true [dependencies.semver] version = ">0.1" optional = true + [features] sys = [] log-full = ["log", "log-instrument"] From c5e4321cba93f86960ff8e88d86f77161e73bb27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Fri, 11 Jul 2025 17:57:41 +0200 Subject: [PATCH 2/8] Add support for WSL 2.4.4 features --- .../src/core_distribution_information.rs | 23 ++++++++- wslplugins-rs/src/distribution_information.rs | 47 +++++++++++++------ .../src/offline_distribution_information.rs | 32 ++++++++++++- wslplugins-rs/src/plugin/utils.rs | 2 +- 4 files changed, 86 insertions(+), 18 deletions(-) diff --git a/wslplugins-rs/src/core_distribution_information.rs b/wslplugins-rs/src/core_distribution_information.rs index dcc6bf9..56c3f38 100644 --- a/wslplugins-rs/src/core_distribution_information.rs +++ b/wslplugins-rs/src/core_distribution_information.rs @@ -9,6 +9,7 @@ //! of a distribution. Implementing this trait allows for seamless integration with systems //! that need to handle multiple distributions in a consistent manner. +use crate::api::errors::require_update_error::Result; use std::ffi::OsString; use windows::core::GUID; @@ -36,7 +37,27 @@ pub trait CoreDistributionInformation { /// The package family name is applicable if the distribution is packaged. /// /// # Returns - /// - `Some`(OsString)`: If the distribution has a package family name. + /// - `Some(package_family_name)`: If the distribution has a package family name. /// - `None`: If the distribution is not packaged or the information is unavailable. fn package_family_name(&self) -> Option; + + /// Retrieves the type of distribution (ubuntu, debian, ...), if available. + /// + /// # Returns + /// - `Ok(Some(flavor)`: If the distribution has a flavor. + /// - `Ok(None)`: If the distribution does not have a falvour. + /// - `Err(e)`: if the API version is too low to retrieve this information. + /// # Errors + /// Returns an error if the API version is too low to retrieve this information. + fn flavor(&self) -> Result>; + + /// Retrieves the version of the distribution, if available + /// + /// # Returns + /// - `Ok(Some(version)`: If the distribution version is available. + /// - `Ok(None)`: If the distribution does not have a specified version. + /// - `Err(e)`: if the API version is too low to retrieve this information. + /// # Errors + /// Returns an error if the API version is too low to retrieve this information. + fn version(&self) -> Result>; } diff --git a/wslplugins-rs/src/distribution_information.rs b/wslplugins-rs/src/distribution_information.rs index 3923c38..ae28f85 100644 --- a/wslplugins-rs/src/distribution_information.rs +++ b/wslplugins-rs/src/distribution_information.rs @@ -68,9 +68,9 @@ impl DistributionInformation { /// the requirement, an error is returned. /// /// # Returns - /// - `Ok(u32)`: The PID of the init process. + /// - `Ok(pid)`: The PID of the init process. /// # Errors - /// [Error]: If the runtime version version is insufficient if no [WSLContext] found we assume returned value is accessible. + /// [Error]: If the runtime version version is insufficient. pub fn init_pid(&self) -> Result { check_required_version_result_from_context( WSLContext::get_current(), @@ -90,27 +90,14 @@ impl DistributionInformation { } impl CoreDistributionInformation for DistributionInformation { - /// Retrieves the unique ID of the distribution. - /// - /// # Returns - /// A reference to the [GUID] representing the distribution's unique identifier. fn id(&self) -> GUID { self.0.Id } - /// Retrieves the name of the distribution. - /// - /// # Returns - /// An [OsString] containing the display name of the distribution. fn name(&self) -> OsString { unsafe { OsString::from_wide(self.0.Name.as_wide()) } } - /// Retrieves the package family name of the distribution, if available. - /// - /// # Returns - /// - `Some(OsString)`: If the distribution has a package family name. - /// - `None`: If the distribution is not packaged or the information is unavailable. fn package_family_name(&self) -> Option { unsafe { let ptr = self.0.PackageFamilyName; @@ -121,6 +108,36 @@ impl CoreDistributionInformation for DistributionInformation { } } } + + fn flavor(&self) -> Result> { + check_required_version_result_from_context( + WSLContext::get_current(), + &WSLVersion::new(2, 4, 4), + )?; + unsafe { + let ptr = self.0.Flavor; + if ptr.is_null() { + Ok(None) + } else { + Ok(Some(OsString::from_wide(ptr.as_wide()))) + } + } + } + + fn version(&self) -> Result> { + check_required_version_result_from_context( + WSLContext::get_current(), + &WSLVersion::new(2, 4, 4), + )?; + unsafe { + let ptr = self.0.Flavor; + if ptr.is_null() { + Ok(None) + } else { + Ok(Some(OsString::from_wide(ptr.as_wide()))) + } + } + } } impl PartialEq for DistributionInformation diff --git a/wslplugins-rs/src/offline_distribution_information.rs b/wslplugins-rs/src/offline_distribution_information.rs index 0dc5b71..339d062 100644 --- a/wslplugins-rs/src/offline_distribution_information.rs +++ b/wslplugins-rs/src/offline_distribution_information.rs @@ -4,7 +4,7 @@ //! offering a safe and idiomatic Rust interface for accessing offline distribution details. extern crate wslpluginapi_sys; -use crate::core_distribution_information::CoreDistributionInformation; +use crate::{api::{errors::require_update_error::Result, utils::check_required_version_result_from_context}, core_distribution_information::CoreDistributionInformation, WSLContext, WSLVersion}; use std::{ ffi::OsString, fmt::{Debug, Display}, @@ -73,6 +73,36 @@ impl CoreDistributionInformation for OfflineDistributionInformation { } } } + + fn flavor(&self) -> Result> { + check_required_version_result_from_context( + WSLContext::get_current(), + &WSLVersion::new(2, 4, 4), + )?; + unsafe { + let ptr = self.0.Flavor; + if ptr.is_null() || ptr.is_empty() { + Ok(None) + } else { + Ok(Some(OsString::from_wide(ptr.as_wide()))) + } + } + } + + fn version(&self) -> Result> { + check_required_version_result_from_context( + WSLContext::get_current(), + &WSLVersion::new(2, 4, 4), + )?; + unsafe { + let ptr = self.0.Flavor; + if ptr.is_null() || ptr.is_empty() { + Ok(None) + } else { + Ok(Some(OsString::from_wide(ptr.as_wide()))) + } + } + } } impl PartialEq for OfflineDistributionInformation diff --git a/wslplugins-rs/src/plugin/utils.rs b/wslplugins-rs/src/plugin/utils.rs index 1e17039..613920e 100644 --- a/wslplugins-rs/src/plugin/utils.rs +++ b/wslplugins-rs/src/plugin/utils.rs @@ -30,7 +30,7 @@ use super::{Result, WSLPluginV1}; /// - `required_revision`: The required revision of the API. /// /// # Returns -/// - `Ok(T)`: The created plugin instance. +/// - `Ok(plugin)`: The created plugin instance. /// - `Err(WinError)`: If the API version is insufficient or the plugin is already initialized. /// /// # Errors From 1e40c8939296fd76b6c27d7f30213675a6544ebc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Sun, 13 Jul 2025 19:52:10 +0200 Subject: [PATCH 3/8] Add the new fileds in the debug --- wslplugins-rs/src/distribution_information.rs | 20 +++++++++++- .../src/offline_distribution_information.rs | 31 ++++++++++++++++--- 2 files changed, 45 insertions(+), 6 deletions(-) diff --git a/wslplugins-rs/src/distribution_information.rs b/wslplugins-rs/src/distribution_information.rs index ae28f85..f390247 100644 --- a/wslplugins-rs/src/distribution_information.rs +++ b/wslplugins-rs/src/distribution_information.rs @@ -181,8 +181,26 @@ impl Debug for DistributionInformation { .field("id", &self.id()) .field("package_family_name", &self.package_family_name()) .field("pid_namespace", &self.pid_namespace()); + let mut exhaustive = true; + if let Ok(pid) = self.init_pid() { - dbg.field("init_pid", &pid).finish() + dbg.field("init_pid", &pid); + } else { + exhaustive = false; + }; + if let Ok(flavor) = self.flavor() { + dbg.field("flavor", &flavor); + } else { + exhaustive = false; + }; + if let Ok(version) = self.version() { + dbg.field("version", &version); + } else { + exhaustive = false; + }; + + if exhaustive { + dbg.finish() } else { dbg.finish_non_exhaustive() } diff --git a/wslplugins-rs/src/offline_distribution_information.rs b/wslplugins-rs/src/offline_distribution_information.rs index 339d062..b164a30 100644 --- a/wslplugins-rs/src/offline_distribution_information.rs +++ b/wslplugins-rs/src/offline_distribution_information.rs @@ -4,7 +4,13 @@ //! offering a safe and idiomatic Rust interface for accessing offline distribution details. extern crate wslpluginapi_sys; -use crate::{api::{errors::require_update_error::Result, utils::check_required_version_result_from_context}, core_distribution_information::CoreDistributionInformation, WSLContext, WSLVersion}; +use crate::{ + api::{ + errors::require_update_error::Result, utils::check_required_version_result_from_context, + }, + core_distribution_information::CoreDistributionInformation, + WSLContext, WSLVersion, +}; use std::{ ffi::OsString, fmt::{Debug, Display}, @@ -136,11 +142,26 @@ impl Debug for OfflineDistributionInformation { /// /// The output includes the distribution's name, ID, and package family name. fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_struct("DistributionInformation") - .field("name", &self.name()) + let mut dbg = f.debug_struct("DistributionInformation"); + dbg.field("name", &self.name()) .field("id", &self.id()) - .field("package_family_name", &self.package_family_name()) - .finish() + .field("package_family_name", &self.package_family_name()); + let mut exhaustive = true; + if let Ok(flavor) = self.flavor() { + dbg.field("flavor", &flavor); + } else { + exhaustive = false; + } + if let Ok(version) = self.version() { + dbg.field("version", &version); + } else { + exhaustive = false; + } + if exhaustive { + dbg.finish() + } else { + dbg.finish_non_exhaustive() + } } } From c9939cc983bcf7bfb876616a4416d75da6cbb8e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Mon, 14 Jul 2025 17:45:39 +0200 Subject: [PATCH 4/8] Remove some excesive docs comments --- wslplugins-rs/src/distribution_information.rs | 11 ----------- wslplugins-rs/src/offline_distribution_information.rs | 6 ------ 2 files changed, 17 deletions(-) diff --git a/wslplugins-rs/src/distribution_information.rs b/wslplugins-rs/src/distribution_information.rs index f390247..d98a927 100644 --- a/wslplugins-rs/src/distribution_information.rs +++ b/wslplugins-rs/src/distribution_information.rs @@ -158,23 +158,12 @@ impl Hash for DistributionInformation { } impl Display for DistributionInformation { - /// Formats the distribution information for display. - /// - /// The output includes the distribution's name and ID. fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { unsafe { write!(f, "{:} {{{:?}}}", self.0.Name.display(), self.0.Id) } } } impl Debug for DistributionInformation { - /// Formats the distribution information for debugging. - /// - /// The output includes: - /// - Name - /// - ID - /// - Package family name (if available) - /// - PID namespace - /// - Init PID (if available and the API version supports it) fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let mut dbg = f.debug_struct("DistributionInformation"); dbg.field("name", &self.name()) diff --git a/wslplugins-rs/src/offline_distribution_information.rs b/wslplugins-rs/src/offline_distribution_information.rs index b164a30..4122694 100644 --- a/wslplugins-rs/src/offline_distribution_information.rs +++ b/wslplugins-rs/src/offline_distribution_information.rs @@ -129,18 +129,12 @@ impl Hash for OfflineDistributionInformation { } impl Display for OfflineDistributionInformation { - /// Formats the offline distribution information for display. - /// - /// The output includes the distribution's name and ID. fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { unsafe { write!(f, "{:} {{{:?}}}", self.0.Name.display(), self.0.Id) } } } impl Debug for OfflineDistributionInformation { - /// Formats the offline distribution information for debugging. - /// - /// The output includes the distribution's name, ID, and package family name. fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let mut dbg = f.debug_struct("DistributionInformation"); dbg.field("name", &self.name()) From 39f7f1ac5be19be2911ee87aad843e75cea3292c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Mon, 14 Jul 2025 18:09:14 +0200 Subject: [PATCH 5/8] Align license --- Cargo.toml | 2 +- LICENSE-APACHE | 201 +++++++++++++++++++++++++++++++++++++++++ LICENSE => LICENSE-MIT | 0 README.md | 2 +- 4 files changed, 203 insertions(+), 2 deletions(-) create mode 100644 LICENSE-APACHE rename LICENSE => LICENSE-MIT (100%) diff --git a/Cargo.toml b/Cargo.toml index da21b05..a31c554 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ wslpluginapi-sys = "0.1.0-rc.1" authors = ["Mickaël Véril "] version = "0.1.0-alpha.0" edition = "2021" -license = "MIT" +license = "Apache-2.0 OR MIT" repository = "https://github.com/mveril/wslplugins-rs" description = "A Rust framework for developing WSL plugins using safe and idiomatic Rust." diff --git a/LICENSE-APACHE b/LICENSE-APACHE new file mode 100644 index 0000000..bc2b7a8 --- /dev/null +++ b/LICENSE-APACHE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2024 Mickaël Véril + + 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. diff --git a/LICENSE b/LICENSE-MIT similarity index 100% rename from LICENSE rename to LICENSE-MIT diff --git a/README.md b/README.md index 92967a5..2999d6f 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ Contributions to WSLPlugins-rs are welcome! If you have improvements or bug fixe ## License -WSLPlugins-rs is released under the MIT License. For more information, please check the LICENSE file in the repository. +WSLPlugins-rs is Licensed under either MIT or Apache-2.0, at your option. For more information, please check the LICENSE-* files in the repository. ## Contact From 392a424c63a622b415d8f80af73dfe04deaf8833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Tue, 15 Jul 2025 16:23:01 +0200 Subject: [PATCH 6/8] clippy fix --- wslplugins-macro-core/build.rs | 2 +- wslplugins-macro-core/src/generator/hook_field_mapping.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wslplugins-macro-core/build.rs b/wslplugins-macro-core/build.rs index 9c87531..4640eaf 100644 --- a/wslplugins-macro-core/build.rs +++ b/wslplugins-macro-core/build.rs @@ -21,7 +21,7 @@ fn main() -> Result<(), Box> { // Generate each enum variant for item in items { - writeln!(file, " {},", item)?; + writeln!(file, " {item},")?; } // End the enum definition diff --git a/wslplugins-macro-core/src/generator/hook_field_mapping.rs b/wslplugins-macro-core/src/generator/hook_field_mapping.rs index 3acab3a..926c81c 100644 --- a/wslplugins-macro-core/src/generator/hook_field_mapping.rs +++ b/wslplugins-macro-core/src/generator/hook_field_mapping.rs @@ -24,7 +24,7 @@ fn generate_hook_fns(hooks: &[Hooks]) -> Result> { .iter() .map(|&mapping| { let ts = c_funcs_tokens::get_c_func_tokens(mapping)?.unwrap_or_else(|| { - panic!("{:?} does not match with predefined C hook value", mapping) + panic!("{mapping:?} does not match with predefined C hook value") }); Ok(ts) }) From ee6d84eb25c83df336c5a53ea1ad272b0007bef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Wed, 16 Jul 2025 14:24:23 +0200 Subject: [PATCH 7/8] Fix windows dependency issues --- .gitignore | 3 +- Cargo.lock | 983 ------------------------------ Cargo.toml | 1 + plugin/Cargo.toml | 4 +- plugin/src/lib.rs | 8 +- wslplugins-macro-tests/Cargo.toml | 2 +- wslplugins-rs/Cargo.toml | 2 +- wslplugins-rs/src/api/api_v1.rs | 3 +- 8 files changed, 12 insertions(+), 994 deletions(-) delete mode 100644 Cargo.lock diff --git a/.gitignore b/.gitignore index 3611fe1..c9f6e9b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target -/cert.pfx \ No newline at end of file +/cert.pfx +Cargo.lock \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index 22d3a5b..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,983 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anyhow" -version = "1.0.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" - -[[package]] -name = "autocfg" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" - -[[package]] -name = "bitflags" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "cc" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "wasm-bindgen", - "windows-targets", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "cow-utils" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "417bef24afe1460300965a25ff4a24b8b45ad011948302ec221e8a0a81eb2c79" - -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" -dependencies = [ - "libc", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "enumflags2" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" -dependencies = [ - "enumflags2_derive", -] - -[[package]] -name = "enumflags2_derive" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "etc-os-release" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3ab3b560ce06f55db2a56928ad3e051680eb1995feb21c855619e08cb7f0a2b" -dependencies = [ - "indexmap", - "thiserror 1.0.63", -] - -[[package]] -name = "fern" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9f0c14694cbd524c8720dd69b0e3179344f04ebb5f90f2e4a440c6ea3b2f1ee" -dependencies = [ - "log", -] - -[[package]] -name = "flagset" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3ea1ec5f8307826a5b71094dd91fc04d4ae75d5709b20ad351c7fb4815c86ec" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "iana-time-zone" -version = "0.1.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core 0.52.0", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "indexmap" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "js-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "libc" -version = "0.2.155" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" - -[[package]] -name = "log" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" - -[[package]] -name = "log-instrument" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a53bea7f726045518db151b1c9372b0d5f2a477a572b4865298c45a904565827" -dependencies = [ - "log", - "log-instrument-macros", -] - -[[package]] -name = "log-instrument-macros" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64860ae60b51788d332351feb17aca069f3e7e8a8fcd9235d5537e6fb48dc23c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "plugin" -version = "0.1.0-alpha.0" -dependencies = [ - "chrono", - "etc-os-release", - "fern", - "log", - "log-instrument", - "windows 0.58.0", - "wslplugins-rs", -] - -[[package]] -name = "proc-macro2" -version = "1.0.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rustversion" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "semver" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" - -[[package]] -name = "serde" -version = "1.0.206" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b3e4cd94123dd520a128bcd11e34d9e9e423e7e3e50425cb1b4b1e3549d0284" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.206" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabfb6138d2383ea8208cf98ccf69cdfb1aff4088460681d84189aa259762f97" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.122" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "serde_spanned" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" -dependencies = [ - "serde", -] - -[[package]] -name = "sha2" -version = "0.10.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "struct-field-names-as-array" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ba4bae771f9cc992c4f403636c54d2ef13acde6367583e99d06bb336674dd9" -dependencies = [ - "struct-field-names-as-array-derive", -] - -[[package]] -name = "struct-field-names-as-array-derive" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2dbf8b57f3ce20e4bb171a11822b283bdfab6c4bb0fe64fa729f045f23a0938" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "strum" -version = "0.26.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn", -] - -[[package]] -name = "syn" -version = "2.0.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "1.0.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" -dependencies = [ - "thiserror-impl 1.0.63", -] - -[[package]] -name = "thiserror" -version = "2.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93605438cbd668185516ab499d589afb7ee1859ea3d5fc8f6b0755e1c7443767" -dependencies = [ - "thiserror-impl 2.0.7", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d8749b4531af2117677a5fcd12b1348a3fe2b81e36e61ffeac5c4aa3273e36" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "toml" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "trybuild" -version = "1.0.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "207aa50d36c4be8d8c6ea829478be44a372c6a77669937bb39c698e52f1491e8" -dependencies = [ - "glob", - "serde", - "serde_derive", - "serde_json", - "termcolor", - "toml", -] - -[[package]] -name = "typed-path" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04645b6c01cfb2ddabffc7c67ae6bfe7c3e28a5c37d729f6bb498e784f1fd70c" - -[[package]] -name = "typenum" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "wasm-bindgen" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" - -[[package]] -name = "widestring" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" - -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "windows" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" -dependencies = [ - "windows-core 0.58.0", - "windows-targets", -] - -[[package]] -name = "windows" -version = "0.61.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" -dependencies = [ - "windows-collections", - "windows-core 0.61.2", - "windows-future", - "windows-link", - "windows-numerics", -] - -[[package]] -name = "windows-collections" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" -dependencies = [ - "windows-core 0.61.2", -] - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-core" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" -dependencies = [ - "windows-implement 0.58.0", - "windows-interface 0.58.0", - "windows-result 0.2.0", - "windows-strings 0.1.0", - "windows-targets", -] - -[[package]] -name = "windows-core" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" -dependencies = [ - "windows-implement 0.60.0", - "windows-interface 0.59.1", - "windows-link", - "windows-result 0.3.4", - "windows-strings 0.4.2", -] - -[[package]] -name = "windows-future" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" -dependencies = [ - "windows-core 0.61.2", - "windows-link", - "windows-threading", -] - -[[package]] -name = "windows-implement" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-implement" -version = "0.60.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-interface" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-interface" -version = "0.59.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-link" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" - -[[package]] -name = "windows-numerics" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" -dependencies = [ - "windows-core 0.61.2", - "windows-link", -] - -[[package]] -name = "windows-result" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-result" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result 0.2.0", - "windows-targets", -] - -[[package]] -name = "windows-strings" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows-threading" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "winnow" -version = "0.6.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" -dependencies = [ - "memchr", -] - -[[package]] -name = "wslpluginapi-sys" -version = "0.1.0-rc.1+2.4.4" -source = "git+https://github.com/mveril/wslpluginapi-sys.git?branch=release%2F0.1.0-rc.1%2B2.4.4#22a9877a9da046fadc9e9a5147cb1b654136a7f5" -dependencies = [ - "anyhow", - "cow-utils", - "hex", - "libc", - "semver", - "serde", - "serde_json", - "sha2", - "struct-field-names-as-array", - "windows 0.58.0", -] - -[[package]] -name = "wslplugins-macro" -version = "0.1.0-alpha.0" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wslplugins-macro-core", -] - -[[package]] -name = "wslplugins-macro-core" -version = "0.1.0-alpha.0" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "struct-field-names-as-array", - "strum", - "syn", - "wslpluginapi-sys", -] - -[[package]] -name = "wslplugins-macro-tests" -version = "0.1.0-alpha.0" -dependencies = [ - "trybuild", - "windows 0.61.3", - "wslpluginapi-sys", - "wslplugins-rs", -] - -[[package]] -name = "wslplugins-rs" -version = "0.1.0-alpha.0" -dependencies = [ - "bitflags", - "enumflags2", - "flagset", - "log", - "log-instrument", - "semver", - "thiserror 2.0.7", - "typed-path", - "widestring", - "windows 0.58.0", - "wslpluginapi-sys", - "wslplugins-macro", -] diff --git a/Cargo.toml b/Cargo.toml index a31c554..4c7ea1d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ members = [ ] [workspace.dependencies] wslpluginapi-sys = "0.1.0-rc.1" +windows = "0.61.*" [workspace.package] authors = ["Mickaël Véril "] diff --git a/plugin/Cargo.toml b/plugin/Cargo.toml index 0905bcb..5fbf909 100644 --- a/plugin/Cargo.toml +++ b/plugin/Cargo.toml @@ -19,8 +19,8 @@ wslplugins-rs = { path = "../wslplugins-rs", features = [ chrono = "^0.*" log = "0.4" log-instrument = "0.3" -fern = "0.6" +fern = "0.7" etc-os-release = "0.1.0" [dependencies.windows] -version = "0.58" +workspace = true features = ["Win32_Foundation"] diff --git a/plugin/src/lib.rs b/plugin/src/lib.rs index 1128e84..f2499ae 100644 --- a/plugin/src/lib.rs +++ b/plugin/src/lib.rs @@ -38,7 +38,7 @@ fn setup_logging() -> WinResult<()> { .chain(log_file(log_path)?) .apply() .map_err(|_| WinError::from(E_FAIL))?; - info!("Logging configured: {:}", log_level); + info!("Logging configured: {log_level:}"); Ok(()) } #[wsl_plugin_v1(2, 1, 2)] @@ -57,7 +57,7 @@ impl WSLPluginV1 for Plugin { user_settings: &WSLVmCreationSettings, ) -> Result<()> { let flags: WSLUserConfigurationFlags = user_settings.custom_configuration_flags().into(); - info!("User configuration {:?}", flags); + info!("User configuration {flags:?}"); let ver_args = ["/bin/cat", "/proc/version"]; match self @@ -155,10 +155,10 @@ impl Plugin { info!("{}", release.name()) } } - Err(err) => warn!("{}", err), + Err(err) => warn!("{err}"), }, Err(err) => { - warn!("Error on binary execution: {}", err) + warn!("Error on binary execution: {err}") } }; } diff --git a/wslplugins-macro-tests/Cargo.toml b/wslplugins-macro-tests/Cargo.toml index 414014a..73e0fc7 100644 --- a/wslplugins-macro-tests/Cargo.toml +++ b/wslplugins-macro-tests/Cargo.toml @@ -13,7 +13,7 @@ wslplugins-rs = { path = "../wslplugins-rs", features = ["macro"] } wslpluginapi-sys.workspace = true [dependencies.windows] -version = "0.61" +workspace = true features = ["Win32_Foundation"] [dev-dependencies] diff --git a/wslplugins-rs/Cargo.toml b/wslplugins-rs/Cargo.toml index 0020b1e..c7520cc 100644 --- a/wslplugins-rs/Cargo.toml +++ b/wslplugins-rs/Cargo.toml @@ -8,7 +8,7 @@ description.workspace = true edition = "2021" [dependencies.windows] -version = "0.58" +workspace = true features = ["Win32_Foundation", "Win32_System", "Win32_Networking_WinSock"] [dependencies] diff --git a/wslplugins-rs/src/api/api_v1.rs b/wslplugins-rs/src/api/api_v1.rs index 1888653..c5d917c 100644 --- a/wslplugins-rs/src/api/api_v1.rs +++ b/wslplugins-rs/src/api/api_v1.rs @@ -20,8 +20,7 @@ use typed_path::Utf8UnixPath; use widestring::U16CString; use windows::Win32::Networking::WinSock::SOCKET as WinSocket; use windows::{ - core::{Result as WinResult, GUID, PCSTR, PCWSTR}, - Win32::Foundation::BOOL, + core::{Result as WinResult, GUID, PCSTR, PCWSTR, BOOL}, }; use wslpluginapi_sys::WSLPluginAPIV1; From 8c0f2fa94cd2a52fa9e22439a88937fda73cb6f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Wed, 16 Jul 2025 14:59:51 +0200 Subject: [PATCH 8/8] Fix formating --- wslplugins-rs/src/api/api_v1.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wslplugins-rs/src/api/api_v1.rs b/wslplugins-rs/src/api/api_v1.rs index c5d917c..8d8df19 100644 --- a/wslplugins-rs/src/api/api_v1.rs +++ b/wslplugins-rs/src/api/api_v1.rs @@ -18,10 +18,8 @@ use std::os::windows::raw::SOCKET; use std::path::Path; use typed_path::Utf8UnixPath; use widestring::U16CString; +use windows::core::{Result as WinResult, BOOL, GUID, PCSTR, PCWSTR}; use windows::Win32::Networking::WinSock::SOCKET as WinSocket; -use windows::{ - core::{Result as WinResult, GUID, PCSTR, PCWSTR, BOOL}, -}; use wslpluginapi_sys::WSLPluginAPIV1;