diff --git a/Cargo.lock b/Cargo.lock index 9fc54e4..5d5bafc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,10 +27,141 @@ dependencies = [ ] [[package]] -name = "anyhow" -version = "1.0.80" +name = "async-broadcast" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" +dependencies = [ + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-channel" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497c00e0fd83a72a79a39fcbd8e3e2f055d6f6c7e025f3b3d91f4f8e76527fb8" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "pin-project-lite", + "slab", +] + +[[package]] +name = "async-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" +dependencies = [ + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-lock" +version = "3.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd03604047cee9b6ce9de9f70c6cd540a0520c813cbd49bae61f33ab80ed1dc" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-process" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" +dependencies = [ + "async-channel", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix", +] + +[[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", +] + +[[package]] +name = "async-signal" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix", + "signal-hook-registry", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" @@ -59,12 +190,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dfdb4953a096c551ce9ace855a604d702e6e62d77fac690575ae347571717f5" -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.9.1" @@ -80,6 +205,25 @@ dependencies = [ "objc2", ] +[[package]] +name = "blocking" +version = "1.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + +[[package]] +name = "bumpalo" +version = "3.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" + [[package]] name = "bytes" version = "1.5.0" @@ -101,22 +245,18 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" -[[package]] -name = "cfg-expr" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa50868b64a9a6fda9d593ce778849ea8715cd2a3d2cc17ffdb4a2f2f2f1961d" -dependencies = [ - "smallvec", - "target-lexicon", -] - [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "combine" version = "4.6.6" @@ -127,6 +267,21 @@ dependencies = [ "memchr", ] +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + [[package]] name = "dirs-sys" version = "0.5.0" @@ -136,7 +291,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -145,205 +300,157 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" dependencies = [ - "bitflags 2.9.1", + "bitflags", "objc2", ] [[package]] -name = "equivalent" -version = "1.0.1" +name = "endi" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" [[package]] -name = "futures-channel" -version = "0.3.30" +name = "enumflags2" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" dependencies = [ - "futures-core", + "enumflags2_derive", + "serde", ] [[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "futures-executor" -version = "0.3.30" +name = "enumflags2_derive" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" dependencies = [ - "futures-core", - "futures-task", - "futures-util", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "futures-io" -version = "0.3.30" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "futures-macro" -version = "0.3.30" +name = "errno" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", + "libc", + "windows-sys 0.61.2", ] [[package]] -name = "futures-task" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" - -[[package]] -name = "futures-util" -version = "0.3.30" +name = "event-listener" +version = "5.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" dependencies = [ - "futures-core", - "futures-macro", - "futures-task", + "concurrent-queue", + "parking", "pin-project-lite", - "pin-utils", - "slab", ] [[package]] -name = "getrandom" -version = "0.2.14" +name = "event-listener-strategy" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" dependencies = [ - "cfg-if", - "libc", - "wasi", + "event-listener", + "pin-project-lite", ] [[package]] -name = "gimli" -version = "0.29.0" +name = "fastrand" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] -name = "gio" -version = "0.17.0" +name = "futures-core" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1981edf8679d2f2c8ec3120015867f45aa0a1c2d5e3e129ca2f7dda174d3d2a9" -dependencies = [ - "bitflags 1.3.2", - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "gio-sys", - "glib", - "libc", - "once_cell", - "pin-project-lite", - "smallvec", - "thiserror 1.0.57", -] +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] -name = "gio-sys" -version = "0.17.10" +name = "futures-io" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ccf87c30a12c469b6d958950f6a9c09f2be20b7773f7e70d20b867fdf2628c3" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", - "winapi", -] +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] -name = "glib" -version = "0.17.10" +name = "futures-lite" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fad45ba8d4d2cea612b432717e834f48031cd8853c8aaf43b2c79fec8d144b" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" dependencies = [ - "bitflags 1.3.2", - "futures-channel", + "fastrand", "futures-core", - "futures-executor", - "futures-task", - "futures-util", - "gio-sys", - "glib-macros", - "glib-sys", - "gobject-sys", - "libc", - "memchr", - "once_cell", - "smallvec", - "thiserror 1.0.57", + "futures-io", + "parking", + "pin-project-lite", ] [[package]] -name = "glib-macros" -version = "0.17.10" +name = "getrandom" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca5c79337338391f1ab8058d6698125034ce8ef31b72a442437fa6c8580de26" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ - "anyhow", - "heck", - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", + "cfg-if", + "libc", + "wasi", ] [[package]] -name = "glib-sys" -version = "0.17.10" +name = "getrandom" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d80aa6ea7bba0baac79222204aa786a6293078c210abe69ef1336911d4bdc4f0" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ + "cfg-if", "libc", - "system-deps", + "r-efi", + "wasip2", ] [[package]] -name = "gobject-sys" -version = "0.17.10" +name = "gimli" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd34c3317740a6358ec04572c1bcfd3ac0b5b6529275fae255b237b314bb8062" -dependencies = [ - "glib-sys", - "libc", - "system-deps", -] +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" [[package]] -name = "heck" -version = "0.4.1" +name = "hermit-abi" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "indexmap" -version = "2.2.5" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" dependencies = [ "equivalent", "hashbrown", @@ -355,7 +462,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013" dependencies = [ - "bitflags 2.9.1", + "bitflags", "cfg-if", "libc", ] @@ -382,6 +489,16 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +[[package]] +name = "js-sys" +version = "0.3.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + [[package]] name = "libc" version = "0.2.174" @@ -394,10 +511,16 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1580801010e535496706ba011c15f8532df6b42297d2e471fec38ceadd8c0638" dependencies = [ - "bitflags 2.9.1", + "bitflags", "libc", ] +[[package]] +name = "linux-raw-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" + [[package]] name = "log" version = "0.4.21" @@ -410,6 +533,15 @@ version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + [[package]] name = "miniz_oxide" version = "0.7.4" @@ -436,6 +568,19 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" +[[package]] +name = "nix" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" +dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", + "memoffset", +] + [[package]] name = "objc2" version = "0.6.1" @@ -451,7 +596,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6f29f568bec459b0ddff777cec4fe3fd8666d82d5a40ebd0ff7e66134f89bcc" dependencies = [ - "bitflags 2.9.1", + "bitflags", "objc2", "objc2-foundation", ] @@ -462,7 +607,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" dependencies = [ - "bitflags 2.9.1", + "bitflags", "dispatch2", "objc2", ] @@ -489,7 +634,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "900831247d2fe1a09a683278e5384cfb8c80c79fe6b166f9d14bfdde0ea1b03c" dependencies = [ - "bitflags 2.9.1", + "bitflags", "objc2", "objc2-core-foundation", ] @@ -511,7 +656,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25b1312ad7bc8a0e92adae17aa10f90aae1fb618832f9b993b022b591027daed" dependencies = [ - "bitflags 2.9.1", + "bitflags", "block2", "objc2", "objc2-foundation", @@ -539,46 +684,50 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] -name = "pin-project-lite" -version = "0.2.13" +name = "ordered-stream" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] [[package]] -name = "pin-utils" -version = "0.1.0" +name = "parking" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] -name = "pkg-config" -version = "0.3.30" +name = "pin-project-lite" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] -name = "polkit" -version = "0.17.0" +name = "piper" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7866121c1e115212fd6e4eca8f84e03af65eda1a3d57babf849a946c791559c" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ - "bitflags 1.3.2", - "gio", - "glib", - "polkit-sys", + "atomic-waker", + "fastrand", + "futures-io", ] [[package]] -name = "polkit-sys" -version = "0.17.0" +name = "polling" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9277a6580d2cd5b54f9dc428d4ee720e46ca6ba2e7a8b44c26282dbef6ecedf2" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" dependencies = [ - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "system-deps", + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix", + "windows-sys 0.61.2", ] [[package]] @@ -589,36 +738,11 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro-crate" -version = "1.3.1" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", + "toml_edit", ] [[package]] @@ -632,13 +756,19 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "rand" version = "0.8.5" @@ -666,7 +796,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.14", ] [[package]] @@ -675,7 +805,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" dependencies = [ - "getrandom", + "getrandom 0.2.14", "libredox", "thiserror 2.0.12", ] @@ -706,16 +836,16 @@ dependencies = [ "android-build", "block2", "cfg-if", - "gio", "jni", "objc2", "objc2-foundation", "objc2-local-authentication", - "polkit", "retry", "robius-android-env", "windows", "windows-core", + "zbus", + "zbus_polkit", ] [[package]] @@ -766,6 +896,25 @@ version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" +[[package]] +name = "rustix" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + [[package]] name = "same-file" version = "1.0.6" @@ -777,31 +926,43 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.196" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn", ] [[package]] -name = "serde_spanned" -version = "0.6.5" +name = "serde_repr" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ - "serde", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -810,6 +971,15 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "signal-hook-registry" +version = "1.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" +dependencies = [ + "libc", +] + [[package]] name = "slab" version = "0.4.9" @@ -820,21 +990,10 @@ dependencies = [ ] [[package]] -name = "smallvec" -version = "1.13.1" +name = "static_assertions" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "syn" @@ -848,24 +1007,18 @@ dependencies = [ ] [[package]] -name = "system-deps" -version = "6.2.0" +name = "tempfile" +version = "3.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2d580ff6a20c55dfb86be5f9c238f67835d0e81cbdea8bf5680e0897320331" +checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ - "cfg-expr", - "heck", - "pkg-config", - "toml", - "version-compare", + "fastrand", + "getrandom 0.3.4", + "once_cell", + "rustix", + "windows-sys 0.61.2", ] -[[package]] -name = "target-lexicon" -version = "0.12.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" - [[package]] name = "thiserror" version = "1.0.57" @@ -892,7 +1045,7 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn", ] [[package]] @@ -903,7 +1056,7 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn", ] [[package]] @@ -921,67 +1074,93 @@ dependencies = [ ] [[package]] -name = "toml" -version = "0.8.10" +name = "toml_datetime" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" +checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" dependencies = [ - "serde", - "serde_spanned", + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.23.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6485ef6d0d9b5d0ec17244ff7eb05310113c3f316f2d14200d4de56b3cb98f8d" +dependencies = [ + "indexmap", "toml_datetime", - "toml_edit 0.22.6", + "toml_parser", + "winnow", ] [[package]] -name = "toml_datetime" -version = "0.6.5" +name = "toml_parser" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" dependencies = [ - "serde", + "winnow", ] [[package]] -name = "toml_edit" -version = "0.19.15" +name = "tracing" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647" dependencies = [ - "indexmap", - "toml_datetime", - "winnow 0.5.40", + "pin-project-lite", + "tracing-attributes", + "tracing-core", ] [[package]] -name = "toml_edit" -version = "0.22.6" +name = "tracing-attributes" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "winnow 0.6.5", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "unicode-ident" -version = "1.0.12" +name = "tracing-core" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c" +dependencies = [ + "once_cell", +] [[package]] -name = "version-compare" -version = "0.1.1" +name = "uds_windows" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29" +checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" +dependencies = [ + "memoffset", + "tempfile", + "winapi", +] [[package]] -name = "version_check" -version = "0.9.4" +name = "unicode-ident" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "uuid" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] [[package]] name = "walkdir" @@ -999,6 +1178,60 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" +dependencies = [ + "unicode-ident", +] + [[package]] name = "winapi" version = "0.3.9" @@ -1060,7 +1293,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn", ] [[package]] @@ -1071,9 +1304,15 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn", ] +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + [[package]] name = "windows-result" version = "0.1.1" @@ -1103,11 +1342,11 @@ dependencies = [ [[package]] name = "windows-sys" -version = "0.60.2" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-targets 0.53.2", + "windows-link", ] [[package]] @@ -1134,29 +1373,13 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.5", "windows_aarch64_msvc 0.52.5", "windows_i686_gnu 0.52.5", - "windows_i686_gnullvm 0.52.5", + "windows_i686_gnullvm", "windows_i686_msvc 0.52.5", "windows_x86_64_gnu 0.52.5", "windows_x86_64_gnullvm 0.52.5", "windows_x86_64_msvc 0.52.5", ] -[[package]] -name = "windows-targets" -version = "0.53.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" -dependencies = [ - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", -] - [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -1169,12 +1392,6 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -1187,12 +1404,6 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -1205,24 +1416,12 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" -[[package]] -name = "windows_i686_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -1235,12 +1434,6 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" -[[package]] -name = "windows_i686_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -1253,12 +1446,6 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -1271,12 +1458,6 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -1290,25 +1471,130 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] -name = "windows_x86_64_msvc" -version = "0.53.0" +name = "winnow" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] -name = "winnow" -version = "0.5.40" +name = "zbus" +version = "5.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "b622b18155f7a93d1cd2dc8c01d2d6a44e08fb9ebb7b3f9e6ed101488bad6c91" dependencies = [ - "memchr", + "async-broadcast", + "async-executor", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "enumflags2", + "event-listener", + "futures-core", + "futures-lite", + "hex", + "nix", + "ordered-stream", + "serde", + "serde_repr", + "tracing", + "uds_windows", + "uuid", + "windows-sys 0.61.2", + "winnow", + "zbus_macros", + "zbus_names", + "zvariant", ] [[package]] -name = "winnow" -version = "0.6.5" +name = "zbus_macros" +version = "5.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" +checksum = "1cdb94821ca8a87ca9c298b5d1cbd80e2a8b67115d99f6e4551ac49e42b6a314" dependencies = [ - "memchr", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", + "zbus_names", + "zvariant", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97" +dependencies = [ + "serde", + "static_assertions", + "winnow", + "zvariant", +] + +[[package]] +name = "zbus_polkit" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad23d5c4d198c7e2641b33e6e0d1f866f117408ba66fe80bbe52e289eeb77c52" +dependencies = [ + "enumflags2", + "serde", + "serde_repr", + "static_assertions", + "zbus", +] + +[[package]] +name = "zvariant" +version = "5.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2be61892e4f2b1772727be11630a62664a1826b62efa43a6fe7449521cb8744c" +dependencies = [ + "endi", + "enumflags2", + "serde", + "winnow", + "zvariant_derive", + "zvariant_utils", +] + +[[package]] +name = "zvariant_derive" +version = "5.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da58575a1b2b20766513b1ec59d8e2e68db2745379f961f86650655e862d2006" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6949d142f89f6916deca2232cf26a8afacf2b9fdc35ce766105e104478be599" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn", + "winnow", ] diff --git a/Cargo.toml b/Cargo.toml index f1cc0ad..0d47690 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,9 +66,8 @@ objc2-ui-kit = { version = "0.3.1", default-features = false, feat ## Linux-specific dependencies used in multiple crates in the workspace. -polkit = "=0.17.0" -gio = "=0.17.0" - +zbus = "5.12.0" +zbus_polkit = "5.0.0" ## Windows-specific dependencies used in multiple crates in the workspace. windows-core = { version = "0.56.0", default-features = false } diff --git a/crates/authentication/Cargo.toml b/crates/authentication/Cargo.toml index cb1738c..acc0d26 100644 --- a/crates/authentication/Cargo.toml +++ b/crates/authentication/Cargo.toml @@ -5,6 +5,7 @@ edition.workspace = true authors = [ "Kevin Boos ", "Klim Tsoutsman ", + "Tyrese Luo ", "Project Robius Maintainers", ] description = "Rust abstractions for multi-platform native authentication: biometrics, fingerprint, password, screen lock, TouchID, FaceID, Windows Hello, etc." @@ -50,8 +51,8 @@ objc2-foundation = { workspace = true, features = ["NSError", "NSString"] } # optional = true [target.'cfg(target_os = "linux")'.dependencies] -polkit.workspace = true -gio.workspace = true +zbus.workspace = true +zbus_polkit = { workspace = true } [target.'cfg(target_os = "windows")'.dependencies] retry.workspace = true diff --git a/crates/authentication/README.md b/crates/authentication/README.md index 2546e9a..a3575f2 100644 --- a/crates/authentication/README.md +++ b/crates/authentication/README.md @@ -30,43 +30,73 @@ To use this crate on Android, you must add the following to your app's `AndroidM ``` -## Example - -```rust -use robius_authentication::{ - AndroidText, BiometricStrength, Context, Policy, PolicyBuilder, Text, WindowsText, -}; - -let policy: Policy = PolicyBuilder::new() - .biometrics(Some(BiometricStrength::Strong)) - .password(true) - .companion(true) - .build() - .unwrap(); - -let text = Text { - android: AndroidText { - title: "Title", - subtitle: None, - description: None, - }, - apple: "authenticate", - windows: WindowsText::new("Title", "Description"), -}; - -let callback = |auth_result| { - match auth_result { - Ok(_) => log::info!("Authentication success!"), - Err(_) => log::error!(Authentication failed!"), - } -}; - -Context::new(()) - .authenticate(text, &policy, callback) - .expect("Authentication failed"); +## Usage on Linux + +On Linux, `robius-authentication` uses **polkit** to request authorization via the +desktop environment's native authentication prompt (GNOME/KDE/etc). + +> [!IMPORTANT] +> **Ensure a polkit agent is running** +> +> The prompt is displayed by a polkit authentication agent (GNOME/KDE usually start one automatically). +> If no agent is running (headless/SSH), no prompt will appear and auth will fail. + +### Write policy file. + +You can create your application's own policy file from scratch, or also create one from a template policy file. + +See here for an example template policy file: [`./examples/org.robius.authentication.policy`](./examples/org.robius.authentication.policy) + +> [!NOTE] +> +> A polkit policy file (`*.policy`) is an XML file that defines one or more authorization **actions** for your application. +polkit uses these definitions to determine whether a user is allowed to perform privileged operations. +> +> The “actions” directory (/usr/share/polkit-1/actions/) contains .policy files that define polkit authorization actions. + +### Quick Test Mode ⚠️ + +#### Step 1. Install your policy file (`*.policy`) + +Install the policy file into the polkit `actions` directory, which is used to define authorization actions for the application. + +Manually execute the following command: + +```bash +sudo install -Dm644 com.yourapp.policy /usr/share/polkit-1/actions/ +``` +`polkit` loads policy definitions from /usr/share/polkit-1/actions/. + +#### Step 2. Ensure your policy file was correctly installed. + +```bash +pkaction --action-id ``` -For more details about the prompt text, see the `Text` struct, -which allows you to customize the prompt for each platform. +> During the test mode, you don't need to worry about the location of the policy file; just ensure it installs correctly. + +### Release Mode + +> The official polkit documentation explicitly states: Mechanisms should install action XML files to [/usr/share/polkit-1/actions](https://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html). + + +As long as your packaging tool provides the capability to automatically install *.policy files under /usr/share/polkit-1/actions/. + +This document provides example for when you are using `cargo-packager`. + +See the example below for use `cargo-packager`. + +#### Use `cargo-packager` + +```toml +# https://docs.crabnebula.dev/packager/configuration/#debianconfig +[package.metadata.packager.deb] +depends = "./dist/depends_deb.txt" +desktop_template = "./packaging/robrix.desktop" +section = "utils" + +[package.metadata.packager.deb.files] +"./packaging/org.robius.authentication.policy" = "/usr/share/polkit-1/actions/org.robius.authentication.policy" +``` -[`polkit`]: https://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html +When you are packaging, `cargo-packager` automatically installs files to their target direactory. \ No newline at end of file diff --git a/crates/authentication/examples/org.robius.authentication.policy b/crates/authentication/examples/org.robius.authentication.policy new file mode 100644 index 0000000..1c22f8c --- /dev/null +++ b/crates/authentication/examples/org.robius.authentication.policy @@ -0,0 +1,37 @@ + + + + + Your vendor name + Your vendor url + + Your icon name + + + + Authenticate to use YourApp + + Authentication is required + + + no + + no + + auth_admin + + + + + + Authenticate to change settings + Authentication is required to change settings. + + no + no + auth_admin + + + + + \ No newline at end of file diff --git a/crates/authentication/examples/simple_authentication.rs b/crates/authentication/examples/simple_authentication.rs index 45822dc..ecb3fb5 100644 --- a/crates/authentication/examples/simple_authentication.rs +++ b/crates/authentication/examples/simple_authentication.rs @@ -1,14 +1,41 @@ +//! # Recommended usage +//! +//! `Context::authenticate()` is asynchronous: it returns immediately after *starting* +//! authentication and delivers the final result via the callback. +//! +//! **In GUI applications**, you typically do not need any additional synchronization. +//! The application's event loop keeps the process alive while the user interacts with +//! the authentication prompt. +//! +//! ```no_run +//! let context = Context::new(()); +//! context.authenticate(TEXT, &POLICY, |result| { +//! match result { +//! Ok(()) => println!("Authentication successful"), +//! Err(e) => eprintln!("Authentication failed: {:?}", e), +//! } +//! }); +//! ``` +//! +//! # Why this example uses `mpsc::channel()` +//! +//! This file is a CLI-style demo. Without an event loop, `main()` would exit before the +//! authentication completes (especially on Linux where the polkit check runs in the +//! background). We therefore use an `mpsc::channel()` to wait for the callback. +//! +//! # Linux notes +//! +//! - Ensure the polkit policy file is installed for the chosen `action_id` +//! (see README: "Usage on Linux"). +//! - Ensure a polkit authentication agent is running in the current desktop session, +//! otherwise no prompt will appear and the request will fail with `NoAgent`/`Unavailable`. + +use std::sync::mpsc; + use robius_authentication::{ - AndroidText, BiometricStrength, Context, Policy, PolicyBuilder, Text, WindowsText, + AndroidText, BiometricStrength, Context, PolicyBuilder, Text, WindowsText, }; -const POLICY: Policy = PolicyBuilder::new() - .biometrics(Some(BiometricStrength::Strong)) - .password(true) - .companion(true) - .build() - .unwrap(); - const TEXT: Text = Text { android: AndroidText { title: "Title", @@ -21,20 +48,41 @@ const TEXT: Text = Text { fn main() { let context = Context::new(()); + let mut policy = PolicyBuilder::new() + // On Linux You need to set action_ids. + // See: ./org.robius.authentication.policy file settings and (README: "Usage on Linux"). + .action_ids([ + "org.robius.authentication", + "org.robius.authentication.settings", + ]) + .biometrics(Some(BiometricStrength::Strong)) + .password(true) + .companion(true) + .build() + .unwrap(); + + if let Err(e) = policy.set_action_id("org.robius.authentication.settings") { + eprintln!("Invalid action_id: {:?}", e); + return; + } + + let (tx, rx) = mpsc::channel(); + + // Start authentication. `res` only indicates whether the request was successfully + // initiated; the final result is delivered via the callback. + let res = context.authenticate(TEXT, &policy, move |result| { + let _ = tx.send(result); + }); - let res = context.authenticate( - TEXT, - &POLICY, - |result| match result { - Ok(_) => println!("Authentication successful"), - Err(e) => println!("Authentication failed: {:?}", e), - }, - ); - - // Note: if `res` is `Ok`, the authentication did not necessarily succeed. - // The callback will be called with the result of the authentication. - // If `res` is `Err`, it indicates an error in the authentication policy or context setup. if let Err(e) = res { - eprintln!("Authentication failed: {:?}", e); + eprintln!("Failed to start authentication: {:?}", e); + return; + } + + // Block until the callback produces a result. + match rx.recv() { + Ok(Ok(_)) => println!("Authentication successful"), + Ok(Err(e)) => println!("Authentication failed: {:?}", e), + Err(e) => eprintln!("Failed to receive auth result: {:?}", e), } } diff --git a/crates/authentication/img/linux-screenshot.png b/crates/authentication/img/linux-screenshot.png new file mode 100644 index 0000000..aa65299 Binary files /dev/null and b/crates/authentication/img/linux-screenshot.png differ diff --git a/crates/authentication/src/error.rs b/crates/authentication/src/error.rs index 23d721a..f8eb013 100644 --- a/crates/authentication/src/error.rs +++ b/crates/authentication/src/error.rs @@ -2,7 +2,7 @@ pub type Result = std::result::Result; /// An error produced during authentication. -#[derive(Debug)] +#[derive(Debug, Clone)] pub enum Error { // TODO: Reexport jni::errors::Error // TODO: Remove target cfg @@ -19,6 +19,8 @@ pub enum Error { Unavailable, /// The user canceled authentication. UserCanceled, + /// The provided action ID is not in the policy's allowed list. + InvalidActionId, // Apple-specific errors /// The app canceled authentication. diff --git a/crates/authentication/src/lib.rs b/crates/authentication/src/lib.rs index 3fddb10..d7fc53f 100644 --- a/crates/authentication/src/lib.rs +++ b/crates/authentication/src/lib.rs @@ -46,21 +46,11 @@ //! .expect("authentication failed"); //! ``` //! -//! The `Policy` and `Text` structs can also be constructed at compile-time to -//! avoid run-time unwraps: +//! The `Text` struct can also be constructed at compile-time to avoid run-time unwraps: //! ``` //! #![feature(const_option)] //! -//! use robius_authentication::{ -//! AndroidText, BiometricStrength, Policy, PolicyBuilder, Text, WindowsText, -//! }; -//! -//! const POLICY: Policy = PolicyBuilder::new() -//! .biometrics(Some(BiometricStrength::Strong)) -//! .password(true) -//! .companion(true) -//! .build() -//! .unwrap(); +//! use robius_authentication::{AndroidText, Text, WindowsText}; //! //! const TEXT: Text = Text { //! android: AndroidText { @@ -142,6 +132,14 @@ impl Context { /// Note that the callback may be not be called at all, /// but will always be called upon success. /// + /// On Linux: `message` is unused because polkit looks up the prompt text from the + /// action definition in the installed `.policy` file (its ``/``). + /// The client only supplies an action ID to `CheckAuthorization`, and there is no + /// stable, cross-agent way to override that UI text at runtime. + /// If you need multiple prompt strings, define multiple actions in the policy file + /// and select the desired one via `PolicyBuilder::action_ids` and + /// `Policy::set_action_id` before each authentication. + /// /// Thus, authentication failed if this function returns an error /// **OR** if the `callback` is invoked with `Err(_)`. #[inline] @@ -178,6 +176,9 @@ pub enum BiometricStrength { /// when being requested to enable/disable various authentication methods. /// Enabling all options is the safest way to ensure that the authentication prompt /// will be displayed correctly on all platforms. +/// +/// On Linux, at least one polkit action ID *MUST* be explicitly provided. +/// If not set (or empty), `build()` will return None. #[derive(Debug)] pub struct PolicyBuilder { inner: sys::PolicyBuilder, @@ -199,13 +200,40 @@ impl PolicyBuilder { } } + /// Sets the list of action identifiers that require authorization. + /// + /// On Linux systems, these map to polkit `action_id`s, which represent + /// specific privileged operations (such as modifying system settings or + /// powering off the device). The authentication backend uses the current + /// action ID to determine whether the action is permitted and whether + /// user authentication is required. + /// + /// The first entry is used as the default action ID. To switch between + /// multiple action IDs at runtime on Linux, build a policy once and call + /// [`Policy::set_action_id`] before each authentication. The setter + /// validates against this list. + /// + /// This only has an effect on linux. + #[inline] + #[must_use] + pub fn action_ids(self, ids: I) -> Self + where + I: IntoIterator, + S: Into, + { + let ids = ids.into_iter().map(Into::into).collect::>(); + Self { + inner: self.inner.action_ids(ids), + } + } + /// Configures biometric authentication with the given strength. /// /// The strength only has an effect on Android, see [`BiometricStrength`] /// for more details. #[inline] #[must_use] - pub const fn biometrics(self, strength: Option) -> Self { + pub fn biometrics(self, strength: Option) -> Self { Self { inner: self.inner.biometrics(strength), } @@ -214,7 +242,7 @@ impl PolicyBuilder { /// Sets whether the policy supports passwords. #[inline] #[must_use] - pub const fn password(self, password: bool) -> Self { + pub fn password(self, password: bool) -> Self { Self { inner: self.inner.password(password), } @@ -225,7 +253,7 @@ impl PolicyBuilder { /// This only has an effect on iOS and macOS. #[inline] #[must_use] - pub const fn companion(self, companion: bool) -> Self { + pub fn companion(self, companion: bool) -> Self { Self { inner: self.inner.companion(companion), } @@ -236,7 +264,7 @@ impl PolicyBuilder { /// This only has an effect on Apple watchOS. #[inline] #[must_use] - pub const fn wrist_detection(self, wrist_detection: bool) -> Self { + pub fn wrist_detection(self, wrist_detection: bool) -> Self { Self { inner: self.inner.wrist_detection(wrist_detection), } @@ -248,7 +276,7 @@ impl PolicyBuilder { /// current target. #[inline] #[must_use] - pub const fn build(self) -> Option { + pub fn build(self) -> Option { Some(Policy { inner: match self.inner.build() { Some(inner) => inner, @@ -263,3 +291,16 @@ impl PolicyBuilder { pub struct Policy { inner: sys::Policy, } + +impl Policy { + /// Sets the polkit action ID used on Linux. + /// + /// Returns [`Error::InvalidActionId`] if the ID is not in the allowed list + /// provided via [`PolicyBuilder::action_ids`]. + /// + /// This is a no-op on non-Linux platforms. + #[inline] + pub fn set_action_id(&mut self, id: impl Into) -> Result<()> { + self.inner.set_action_id(id.into()) + } +} diff --git a/crates/authentication/src/sys.rs b/crates/authentication/src/sys.rs index f4d6b04..4c045c0 100644 --- a/crates/authentication/src/sys.rs +++ b/crates/authentication/src/sys.rs @@ -5,9 +5,9 @@ cfg_if::cfg_if! { } else if #[cfg(target_vendor = "apple")] { mod apple; pub(crate) use apple::*; - // } else if #[cfg(target_os = "linux")] { // linux is currently unsupported - // mod linux; - // pub(crate) use linux::*; + } else if #[cfg(target_os = "linux")] { + mod linux; + pub(crate) use linux::*; } else if #[cfg(target_os = "windows")] { mod windows; pub(crate) use windows::*; diff --git a/crates/authentication/src/sys/android/mod.rs b/crates/authentication/src/sys/android/mod.rs index 5c38aea..be868a4 100644 --- a/crates/authentication/src/sys/android/mod.rs +++ b/crates/authentication/src/sys/android/mod.rs @@ -97,6 +97,13 @@ pub(crate) struct Policy { password: bool, } +impl Policy { + #[inline] + pub(crate) fn set_action_id(&mut self, _: String) -> Result<()> { + Ok(()) + } +} + #[derive(Debug)] pub(crate) struct PolicyBuilder { biometrics: Option, @@ -127,6 +134,10 @@ impl PolicyBuilder { self } + pub(crate) fn action_ids(self, _: Vec) -> Self { + self + } + pub(crate) const fn build(self) -> Option { if let Some(strength) = self.biometrics { return Some(Policy { diff --git a/crates/authentication/src/sys/apple.rs b/crates/authentication/src/sys/apple.rs index e4516ce..9d062ce 100644 --- a/crates/authentication/src/sys/apple.rs +++ b/crates/authentication/src/sys/apple.rs @@ -89,6 +89,13 @@ pub(crate) struct Policy { inner: LAPolicy, } +impl Policy { + #[inline] + pub(crate) fn set_action_id(&mut self, _: String) -> Result<()> { + Ok(()) + } +} + #[derive(Debug)] pub(crate) struct PolicyBuilder { _biometrics: bool, @@ -135,6 +142,10 @@ impl PolicyBuilder { } } + pub(crate) fn action_ids(self, _: Vec) -> Self { + self + } + pub(crate) const fn build(self) -> Option { // TODO: Test watchos diff --git a/crates/authentication/src/sys/linux.rs b/crates/authentication/src/sys/linux.rs deleted file mode 100644 index 38ff76c..0000000 --- a/crates/authentication/src/sys/linux.rs +++ /dev/null @@ -1,84 +0,0 @@ -//! This module is not public yet because it is a work in progress. - -use polkit::{Authority, CheckAuthorizationFlags, Details, UnixProcess}; - -use crate::{BiometricStrength, Result}; - -#[derive(Debug)] -pub struct Policy; - -#[derive(Debug)] -pub(crate) struct PolicyBuilder; - -impl PolicyBuilder { - pub(crate) const fn new() -> Self { - Self - } - - pub(crate) const fn biometrics(self, _: Option) -> Self { - Self - } - - pub(crate) const fn password(self, _: bool) -> Self { - Self - } - - pub(crate) const fn companion(self, _: bool) -> Self { - Self - } - - pub(crate) const fn wrist_detection(self, _: bool) -> Self { - Self - } - - pub(crate) const fn build(self) -> Option { - Some(Policy) - } -} - -pub(crate) async fn authenticate_async(_message: &str, _: &Policy) -> Result<()> { - unimplemented!() -} - -pub(crate) fn blocking_authenticate(_message: &str, _: &Policy) -> Result<()> { - // TODO: None? - let authority = Authority::sync(Option::<&gio::Cancellable>::None).unwrap(); - - let current_user = "klim"; - - let details = Details::new(); - details.insert("user", Some(current_user)); - // TODO: user.gecos - details.insert("user.display", Some(current_user)); - // TODO: program - // TODO: command_line - details.insert("polkit.message", Some("Testing robius authentication")); - // TODO: polkit.gettext_domain - - // for action in authority - // .enumerate_actions_sync(Option::<&gio::Cancellable>::None) - // .unwrap() - // { - // println!("-- action --"); - // println!("id: {}", action.action_id()); - // println!("description: {}", action.description()); - // println!( - // "allow_gui: {:?}", - // action.annotation("org.freedesktop.policykit.exec.allow_gui") - // ); - // } - - let subject = UnixProcess::new(std::process::id() as i32); - authority - .check_authorization_sync( - &subject, - "org.hello-world.authenticate", - Some(&details), - // None, - CheckAuthorizationFlags::ALLOW_USER_INTERACTION, - Option::<&gio::Cancellable>::None, - ) - .unwrap(); - - Ok(()) -} diff --git a/crates/authentication/src/sys/linux/mod.rs b/crates/authentication/src/sys/linux/mod.rs new file mode 100644 index 0000000..eb53392 --- /dev/null +++ b/crates/authentication/src/sys/linux/mod.rs @@ -0,0 +1,167 @@ +use std::collections::HashMap; +use zbus::{blocking::Connection, fdo, Error as ZbusError}; +use zbus_polkit::policykit1::{AuthorityProxyBlocking, AuthorizationResult, CheckAuthorizationFlags, Subject}; + +use crate::{Error, Result, Text}; + +pub(crate) type RawContext = (); + +#[derive(Debug)] +pub(crate) struct Context; + +impl Context { + #[inline] + pub(crate) fn new(_: RawContext) -> Self { + Self + } + + pub(crate) fn authenticate( + &self, + _message: Text, + policy: &Policy, + callback: F, + ) -> Result<()> + where + F: Fn(Result<()>) + Send + 'static, + { + let action_id = policy.action_id.clone(); + // CheckAuthorization may block (D-Bus round-trips and potential user interaction). + // Run it off the caller thread to avoid blocking UI/event-loop threads. + std::thread::Builder::new() + .name("robius-authentication-polkit".into()) + .spawn(move || { + let res = do_polkit_check(&action_id); + callback(res); + }) + .map_err(|_| Error::Unavailable)?; + Ok(()) + } +} + +pub(crate) fn get_system_connection() -> Result { + Connection::system().map_err(|_| Error::Unavailable) +} + +pub(crate) fn get_authority_proxy( + conn: &Connection, +) -> Result> { + AuthorityProxyBlocking::new(conn).map_err(|_| Error::Unavailable) +} + +fn do_polkit_check(action_id: &str) -> Result<()> { + // Create a fresh system connection and proxy per request to avoid stale handles + // after sleep/resume or bus restarts. + let conn = get_system_connection()?; + let auth = get_authority_proxy(&conn)?; + let details = HashMap::new(); + + // Use a unix-process subject including pid start-time and real uid. + // This avoids pid reuse ambiguity and matches polkit's recommended subject format. + let subject = Subject::new_for_owner(std::process::id(), None, None) + .map_err(|_| Error::Unavailable)?; + + // If details is non-empty then the request will fail with POLKIT_ERROR_FAILED + // unless the process doing the check itsef is sufficiently authorized (e.g. running as uid 0). + let result: AuthorizationResult = auth + .check_authorization( + &subject, + action_id, + &details, + CheckAuthorizationFlags::AllowUserInteraction.into(), + "", + ) + .map_err(|err| { + eprintln!("polkit check_authorization error: {:?}", err); + match err { + ZbusError::MethodError(name, _, _) => match name.as_str() { + "org.freedesktop.PolicyKit1.Error.Cancelled" => Error::UserCanceled, + "org.freedesktop.PolicyKit1.Error.NotAuthorized" => Error::Authentication, + "org.freedesktop.PolicyKit1.Error.NotSupported" => Error::Unavailable, + "org.freedesktop.PolicyKit1.Error.NoAgent" => Error::Unavailable, + _ => Error::Authentication, + }, + ZbusError::FDO(fdo_err) => match *fdo_err { + fdo::Error::TimedOut(_) | fdo::Error::NoReply(_) => Error::Unavailable, + _ => Error::Authentication, + }, + ZbusError::InputOutput(_) => Error::Unavailable, + _ => Error::Authentication, + } + })?; + + if result.is_authorized { + return Ok(()); + } + + if result + .details + .get("polkit.dismissed") + .map(|v| !v.is_empty()) + .unwrap_or(false) + { + return Err(Error::UserCanceled); + } + + + // If we're not authorized, treat as authentication failure. + // "NoAgent" is handled as an error (org.freedesktop.PolicyKit1.Error.NoAgent). + Err(Error::Authentication) +} + +#[derive(Debug)] +pub struct Policy { + pub(crate) action_id: String, + allowed_action_ids: Vec, +} + +impl Policy { + #[inline] + pub(crate) fn set_action_id(&mut self, id: String) -> Result<()> { + if self.allowed_action_ids.iter().any(|allowed| allowed == &id) { + self.action_id = id; + Ok(()) + } else { + Err(Error::InvalidActionId) + } + } +} + +#[derive(Debug)] +pub(crate) struct PolicyBuilder { + action_ids: Option>, +} + +impl PolicyBuilder { + #[inline] + pub const fn new() -> Self { + Self { action_ids: None } + } + + #[inline] + pub fn action_ids(self, ids: Vec) -> Self { + Self { action_ids: Some(ids) } + } + + // The following are no-ops on Linux but kept for cross-platform API. + #[inline] + pub const fn biometrics(self, _: Option) -> Self { self } + #[inline] + pub const fn password(self, _: bool) -> Self { self } + #[inline] + pub const fn companion(self, _: bool) -> Self { self } + #[inline] + pub const fn wrist_detection(self, _: bool) -> Self { self } + + #[inline] + pub fn build(self) -> Option { + let action_ids = self.action_ids?; + if action_ids.is_empty() { + return None; + } + let action_id = action_ids[0].clone(); + Some(Policy { + action_id, + allowed_action_ids: action_ids, + }) + } +} diff --git a/crates/authentication/src/sys/unsupported.rs b/crates/authentication/src/sys/unsupported.rs index 4671ae8..a9064e0 100644 --- a/crates/authentication/src/sys/unsupported.rs +++ b/crates/authentication/src/sys/unsupported.rs @@ -29,6 +29,13 @@ impl Context { #[derive(Debug)] pub(crate) struct Policy; +impl Policy { + #[inline] + pub(crate) fn set_action_id(&mut self, _: String) -> Result<()> { + Ok(()) + } +} + #[derive(Debug)] pub(crate) struct PolicyBuilder; @@ -53,6 +60,10 @@ impl PolicyBuilder { Self } + pub(crate) fn action_ids(self, _: Vec) -> Self { + self + } + pub(crate) const fn build(self) -> Option { None } diff --git a/crates/authentication/src/sys/windows/mod.rs b/crates/authentication/src/sys/windows/mod.rs index c2974e0..61a1c0f 100644 --- a/crates/authentication/src/sys/windows/mod.rs +++ b/crates/authentication/src/sys/windows/mod.rs @@ -69,6 +69,13 @@ impl Context { #[derive(Debug)] pub(crate) struct Policy; +impl Policy { + #[inline] + pub(crate) fn set_action_id(&mut self, _: String) -> Result<()> { + Ok(()) + } +} + #[derive(Debug)] pub(crate) struct PolicyBuilder { valid: bool, @@ -103,6 +110,10 @@ impl PolicyBuilder { self } + pub(crate) fn action_ids(self, _: Vec) -> Self { + self + } + pub(crate) const fn build(self) -> Option { if self.valid { Some(Policy)