diff --git a/Cargo.lock b/Cargo.lock index e773a84..5335b24 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -41,7 +41,7 @@ dependencies = [ "byteorder", "bytesize", "enum_primitive", - "itertools 0.10.5", + "itertools", "log", "memfd", "memmap2", @@ -63,9 +63,9 @@ dependencies = [ "anyhow", "clap", "clone3", - "humantime 1.3.0", + "humantime", "humantime-serde", - "itertools 0.10.5", + "itertools", "libc", "log", "memfd", @@ -104,13 +104,13 @@ dependencies = [ "bytesize", "convert_case", "darling", - "humantime 2.1.0", - "itertools 0.12.0", + "humantime", + "itertools", "proc-macro2", "quote", "static_assertions", "strum", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -121,9 +121,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -145,9 +145,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", @@ -159,43 +159,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys 0.48.0", + "windows-sys", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "arrayvec" @@ -226,21 +226,21 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytesize" @@ -253,9 +253,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -271,21 +274,21 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" dependencies = [ "android-tzdata", "iana-time-zone", - "num-traits 0.2.15", - "winapi", + "num-traits 0.2.18", + "windows-targets", ] [[package]] name = "clap" -version = "4.4.8" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64" +checksum = "80c21025abd42669a92efc996ef13cfb2c5c627858421ea58d5c3b331a6c134f" dependencies = [ "clap_builder", "clap_derive", @@ -293,33 +296,33 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.8" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc" +checksum = "458bf1f341769dfcf849846f65dffdf9146daa56bcd2a47cb4e1de9915567c99" dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim", + "strsim 0.11.0", ] [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "clone3" @@ -345,9 +348,9 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] @@ -363,33 +366,30 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if 1.0.0", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "darling" -version = "0.20.3" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +checksum = "c376d08ea6aa96aafe61237c7200d1241cb177b7d3a542d791f2d118e9cbb955" dependencies = [ "darling_core", "darling_macro", @@ -397,27 +397,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.3" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +checksum = "33043dcd19068b8192064c704b3f83eb464f91f1ff527b44a4e2b08d9cdb8855" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", - "syn 2.0.32", + "strsim 0.10.0", + "syn 2.0.48", ] [[package]] name = "darling_macro" -version = "0.20.3" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +checksum = "c5a91391accf613803c2a9bf9abccdbaa07c54b4244a5b64883f9c3c137c86be" dependencies = [ "darling_core", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -431,9 +431,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "enum_primitive" @@ -446,11 +446,11 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ - "humantime 2.1.0", + "humantime", "is-terminal", "log", "regex", @@ -459,45 +459,31 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "cc", "libc", + "windows-sys", ] [[package]] name = "fastrand" -version = "1.9.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", @@ -539,9 +525,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if 1.0.0", "libc", @@ -550,9 +536,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heck" @@ -567,7 +553,7 @@ dependencies = [ "a653rs", "a653rs-linux", "a653rs-postcard", - "humantime 2.1.0", + "humantime", "log", "memmap2", "nix", @@ -578,9 +564,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" [[package]] name = "hex" @@ -589,12 +575,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] -name = "humantime" -version = "1.3.0" +name = "home" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "quick-error", + "windows-sys", ] [[package]] @@ -609,22 +595,22 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57a3db5ea5923d99402c94e9feb261dc5ee9b4efa158b0315f788cf549cc200c" dependencies = [ - "humantime 2.1.0", + "humantime", "serde", ] [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows", + "windows-core", ] [[package]] @@ -644,74 +630,45 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "2.0.0" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" dependencies = [ "equivalent", "hashbrown", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ "hermit-abi", - "rustix 0.38.19", - "windows-sys 0.48.0", -] - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", + "libc", + "windows-sys", ] [[package]] name = "itertools" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" dependencies = [ "wasm-bindgen", ] @@ -724,143 +681,128 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.150" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "linux-raw-sys" -version = "0.1.4" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memfd" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" +checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.37.27", + "rustix", ] [[package]] name = "memmap2" -version = "0.5.10" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] [[package]] name = "nix" -version = "0.25.1" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "autocfg", - "bitflags 1.3.2", + "bitflags 2.4.2", "cfg-if 1.0.0", "libc", "memoffset", - "pin-utils", ] [[package]] name = "num" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" +checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" dependencies = [ "num-bigint", "num-complex", "num-integer", "num-iter", "num-rational", - "num-traits 0.2.15", + "num-traits 0.2.18", ] [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", - "num-traits 0.2.15", + "num-traits 0.2.18", ] [[package]] name = "num-complex" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" dependencies = [ - "num-traits 0.2.15", + "num-traits 0.2.18", ] [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", - "num-traits 0.2.15", + "num-traits 0.2.18", ] [[package]] name = "num-iter" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" dependencies = [ "autocfg", "num-integer", - "num-traits 0.2.15", + "num-traits 0.2.18", ] [[package]] @@ -872,7 +814,7 @@ dependencies = [ "autocfg", "num-bigint", "num-integer", - "num-traits 0.2.15", + "num-traits 0.2.18", ] [[package]] @@ -881,35 +823,29 @@ version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" dependencies = [ - "num-traits 0.2.15", + "num-traits 0.2.18", ] [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "pin-project-lite" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" - -[[package]] -name = "pin-utils" -version = "0.1.0" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "ping_client" @@ -931,25 +867,23 @@ dependencies = [ [[package]] name = "polling" -version = "2.8.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +checksum = "30054e72317ab98eddd8561db0f6524df3367636884b7b21b703e4b280a84a14" dependencies = [ - "autocfg", - "bitflags 1.3.2", "cfg-if 1.0.0", "concurrent-queue", - "libc", - "log", "pin-project-lite", - "windows-sys 0.48.0", + "rustix", + "tracing", + "windows-sys", ] [[package]] name = "postcard" -version = "1.0.4" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfa512cd0d087cc9f99ad30a1bf64795b67871edbead083ffc3a4dfafa59aa00" +checksum = "a55c51ee6c0db07e68448e336cf8ea4131a620edefebf9893e759b2d793420f8" dependencies = [ "cobs", "serde", @@ -973,54 +907,59 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.64" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] [[package]] name = "procfs" -version = "0.14.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de8dacb0873f77e6aefc6d71e044761fcc68060290f5b1089fcdf84626bb69" +checksum = "731e0d9356b0c25f16f33b5be79b1c57b562f141ebfcdb0ad8ac2c13a24293b4" dependencies = [ - "bitflags 1.3.2", - "byteorder", + "bitflags 2.4.2", "chrono", "flate2", "hex", "lazy_static", - "rustix 0.36.17", + "procfs-core", + "rustix", ] [[package]] -name = "quick-error" -version = "1.2.3" +name = "procfs-core" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" +dependencies = [ + "bitflags 2.4.2", + "chrono", + "hex", +] [[package]] name = "quit" -version = "1.2.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5084cf776cb910f510c5aa4732a06933edb85f6f5785b6d12af90f364800211" +checksum = "c090c608233d81bd6b90e718cf34506c60a10e633dff2292c3d1029e798d669b" dependencies = [ "quit_macros", ] [[package]] name = "quit_macros" -version = "1.2.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef1cf4f32c7fe348eefee85d0941afc70da334fc046a3592cc5356bf60624242" +checksum = "1d4b27a0dd5d08ad7af2d17952fb360ec9c30eeade0b32df7a3c9b099ff37564" [[package]] name = "quote" -version = "1.0.29" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -1055,20 +994,11 @@ dependencies = [ "getrandom", ] -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "regex" -version = "1.9.1" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", @@ -1078,9 +1008,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.2" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83d3daa6976cffb758ec878f108ba0e062a45b2d6ca3a2cca965338855476caf" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", @@ -1089,62 +1019,34 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab07dc67230e4a4718e70fd5c20055a4334b121f1f9db8fe63ef39ce9b8c846" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rustix" -version = "0.36.17" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "305efbd14fde4139eb501df5f136994bb520b033fa9fbdce287507dc23b8c7ed" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.1.4", - "windows-sys 0.45.0", -] - -[[package]] -name = "rustix" -version = "0.37.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "errno", - "io-lifetimes", "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "745ecfa778e66b2b63c88a61cb36e0eea109e803b0b86bf9879fbc77c70e86ed" -dependencies = [ - "bitflags 2.4.1", - "errno", - "libc", - "linux-raw-sys 0.4.11", - "windows-sys 0.48.0", + "linux-raw-sys", + "windows-sys", ] [[package]] name = "rustversion" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "safemem" @@ -1163,29 +1065,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.193" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] name = "serde_yaml" -version = "0.9.22" +version = "0.9.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "452e67b9c20c37fa79df53201dc03839651086ed9bbe92b3ca585ca9fdaa7d85" +checksum = "adf8a49373e98a4c5f0ceb5d05aa7c648d75f63774981ed95b7c7443bbd50c6e" dependencies = [ "indexmap", "itoa", @@ -1206,6 +1108,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" + [[package]] name = "strum" version = "0.25.0" @@ -1225,7 +1133,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -1241,9 +1149,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.32" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -1252,45 +1160,43 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.6.0" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" dependencies = [ - "autocfg", "cfg-if 1.0.0", "fastrand", - "redox_syscall", - "rustix 0.37.27", - "windows-sys 0.48.0", + "rustix", + "windows-sys", ] [[package]] name = "termcolor" -version = "1.2.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] [[package]] name = "thiserror" -version = "1.0.43" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.43" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -1299,6 +1205,22 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" + [[package]] name = "uapi" version = "0.2.10" @@ -1327,15 +1249,15 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unsafe-libyaml" @@ -1351,9 +1273,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -1367,9 +1289,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -1377,24 +1299,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1402,32 +1324,34 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" [[package]] name = "which" -version = "4.4.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "7fa5e0c10bf77f44aac573e498d1a82d5fbd5e91f6fc0a99e7be4b38e85e101c" dependencies = [ "either", - "libc", + "home", "once_cell", + "rustix", + "windows-sys", ] [[package]] @@ -1448,9 +1372,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -1462,142 +1386,76 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets 0.48.1", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.42.2", + "windows-targets", ] [[package]] name = "windows-sys" -version = "0.48.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.48.1", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.42.2" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - -[[package]] -name = "windows-targets" -version = "0.48.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" -dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.2" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" [[package]] name = "windows_aarch64_msvc" -version = "0.42.2" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" [[package]] name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" diff --git a/Cargo.toml b/Cargo.toml index 41a53fe..e21c77f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,3 +20,9 @@ members = [ [workspace.dependencies] a653rs = "0.5" log = "0" +nix = { version = "0.27", features = ["socket", "process", "fs", "uio", "signal", "user", "mount", "event", "sched"] } +memmap2 = "0.9" +procfs = "0.16" +polling = "3.4" +itertools = "0.12.1" +once_cell = "1.19" diff --git a/core/Cargo.toml b/core/Cargo.toml index f67366d..d0399e7 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -9,16 +9,16 @@ license = "MIT OR Apache-2.0" [dependencies] a653rs.workspace = true a653rs.features = [ "bindings" ] +nix.workspace = true +memmap2.workspace = true +procfs.workspace = true +polling.workspace = true +itertools.workspace = true -nix = "0.25" anyhow = "1.0" -procfs = "0.14" -itertools = "0.10" log = "0" walkdir = "2.3" -polling = "2.2" serde = { version = "1.0", features = ["derive"] } -memmap2 = "0.5.5" memfd = "0.6" bincode = "1.3" thiserror = "1.0" diff --git a/core/src/cgroup.rs b/core/src/cgroup.rs index 4edf238..ef9fd20 100644 --- a/core/src/cgroup.rs +++ b/core/src/cgroup.rs @@ -233,7 +233,7 @@ pub fn mount_point() -> anyhow::Result { // TODO: This is an awful old function, replace it! procfs::process::Process::myself()? .mountinfo()? - .iter() + .into_iter() .find(|m| m.fs_type.eq("cgroup2")) // TODO A process can have several cgroup mounts .ok_or_else(|| anyhow!("no cgroup2 mount found")) .map(|m| m.mount_point.clone()) @@ -244,7 +244,8 @@ pub fn mount_point() -> anyhow::Result { pub fn current_cgroup() -> anyhow::Result { let path = procfs::process::Process::myself()? .cgroups()? - .first() + .into_iter() + .next() .ok_or(anyhow!("cannot obtain cgroup"))? .pathname .clone(); diff --git a/core/src/fd.rs b/core/src/fd.rs index 332a6bd..3151126 100644 --- a/core/src/fd.rs +++ b/core/src/fd.rs @@ -9,7 +9,7 @@ use std::time::{Duration, Instant}; use anyhow::{anyhow, Result}; use nix::libc::{c_uint, syscall, SYS_pidfd_open}; use nix::unistd::Pid; -use polling::{Event, Poller}; +use polling::{Event, Events, Poller}; use crate::error::{ResultExt, SystemError, TypedError, TypedResult}; @@ -48,12 +48,12 @@ impl PidFd { // epoll(2) internals, which demand providing a "user data variable" -- a // feature that we make no use of. poller - .modify(self.0.as_raw_fd(), Event::readable(42)) + .modify(&self.0, Event::readable(42)) .map_err(anyhow::Error::from) .typ(SystemError::Panic)?; let poll_res = poller.wait( - Vec::new().as_mut(), + &mut Events::new(), Some(timeout.saturating_sub(now.elapsed())), ); match poll_res { diff --git a/core/src/ipc.rs b/core/src/ipc.rs index 706beec..c97a930 100644 --- a/core/src/ipc.rs +++ b/core/src/ipc.rs @@ -1,6 +1,7 @@ //! Implementation of IPC use std::io::{ErrorKind, IoSlice, IoSliceMut}; use std::marker::PhantomData; +use std::os::fd::{AsFd, BorrowedFd, OwnedFd}; use std::os::unix::net::UnixDatagram; use std::os::unix::prelude::{AsRawFd, FromRawFd, RawFd}; use std::time::Duration; @@ -12,7 +13,7 @@ use nix::sys::socket::{ recvmsg, sendmsg, socketpair, AddressFamily, ControlMessage, ControlMessageOwned, MsgFlags, SockFlag, SockType, }; -use polling::{Event, Poller}; +use polling::{Event, Events, Poller}; use serde::{Deserialize, Serialize}; use crate::error::{ResultExt, SystemError, TypedResult}; @@ -75,11 +76,12 @@ where /// duration pub fn try_recv_timeout(&self, duration: Duration) -> TypedResult> { let poller = Poller::new().typ(SystemError::Panic)?; - poller - .add(self.socket.as_raw_fd(), Event::readable(42)) - .typ(SystemError::Panic)?; - - let poll_res = poller.wait(Vec::new().as_mut(), Some(duration)); + unsafe { + poller + .add(&self.socket, Event::readable(42)) + .typ(SystemError::Panic)?; + } + let poll_res = poller.wait(&mut Events::new(), Some(duration)); if let Err(_) | Ok(0) = poll_res { return Ok(None); } @@ -102,12 +104,10 @@ where ) .typ(SystemError::Panic)?; - unsafe { - let tx = IpcSender::from_raw_fd(tx); - let rx = IpcReceiver::from_raw_fd(rx); + let tx = IpcSender::from(tx); + let rx = IpcReceiver::from(rx); - Ok((tx, rx)) - } + Ok((tx, rx)) } impl AsRawFd for IpcSender { @@ -122,6 +122,36 @@ impl AsRawFd for IpcReceiver { } } +impl AsFd for IpcSender { + fn as_fd(&self) -> BorrowedFd<'_> { + self.socket.as_fd() + } +} + +impl AsFd for IpcReceiver { + fn as_fd(&self) -> BorrowedFd<'_> { + self.socket.as_fd() + } +} + +impl From for IpcSender { + fn from(value: OwnedFd) -> Self { + Self { + socket: UnixDatagram::from(value), + _p: PhantomData, + } + } +} + +impl From for IpcReceiver { + fn from(value: OwnedFd) -> Self { + Self { + socket: UnixDatagram::from(value), + _p: PhantomData, + } + } +} + impl FromRawFd for IpcSender { unsafe fn from_raw_fd(fd: RawFd) -> Self { Self { @@ -150,7 +180,7 @@ pub fn io_pair() -> TypedResult<(IoSender, IoReceiver)> { SockFlag::empty(), ) .typ(SystemError::Panic)?; - unsafe { Ok((IoSender::from_raw_fd(tx), IoReceiver::from_raw_fd(rx))) } + Ok((IoSender::from(tx), IoReceiver::from(rx))) } #[derive(Debug)] @@ -229,6 +259,24 @@ impl AsRawFd for IoReceiver { } } +impl From for IoSender { + fn from(value: OwnedFd) -> Self { + Self { + socket: UnixDatagram::from(value), + _p: PhantomData, + } + } +} + +impl From for IoReceiver { + fn from(value: OwnedFd) -> Self { + Self { + socket: UnixDatagram::from(value), + _p: PhantomData, + } + } +} + impl FromRawFd for IoSender { unsafe fn from_raw_fd(fd: RawFd) -> Self { Self { diff --git a/examples/fuel_tank_controller/Cargo.toml b/examples/fuel_tank_controller/Cargo.toml index dbc9746..faf2697 100644 --- a/examples/fuel_tank_controller/Cargo.toml +++ b/examples/fuel_tank_controller/Cargo.toml @@ -9,9 +9,9 @@ license = "MIT OR Apache-2.0" [dependencies] a653rs = { workspace = true, features = ["macros"] } a653rs-linux = { path = "../../partition" } +nix.workspace = true +memmap2.workspace = true +procfs.workspace = true +once_cell.workspace = true serde = "1.0" -procfs = "0.14" log = "0" -nix = "0.25" -memmap2 = "0.5.5" -once_cell = "1.13" diff --git a/examples/fuel_tank_simulation/Cargo.toml b/examples/fuel_tank_simulation/Cargo.toml index 52d9883..d4c7be2 100644 --- a/examples/fuel_tank_simulation/Cargo.toml +++ b/examples/fuel_tank_simulation/Cargo.toml @@ -10,8 +10,8 @@ license = "MIT OR Apache-2.0" a653rs = { workspace = true, features = ["macros"] } a653rs-linux = { path = "../../partition" } serde = { version = "1.0", features = ["derive"] } -procfs = "0.14" +procfs.workspace = true +nix.workspace = true +memmap2.workspace = true +once_cell.workspace = true log = "0" -nix = "0.25" -memmap2 = "0.5.5" -once_cell = "1.13" diff --git a/examples/hello_part/Cargo.toml b/examples/hello_part/Cargo.toml index 5ae8b0f..a47e907 100644 --- a/examples/hello_part/Cargo.toml +++ b/examples/hello_part/Cargo.toml @@ -11,10 +11,10 @@ license = "MIT OR Apache-2.0" a653rs = { workspace = true, features = ["macros"] } a653rs-postcard = { git = "https://github.com/DLR-FT/a653rs-postcard.git", branch = "main" } a653rs-linux = { path = "../../partition" } +nix.workspace = true +memmap2.workspace = true +procfs.workspace = true +once_cell.workspace = true serde = "1.0" -procfs = "0.14" log = "0" -nix = "0.25" -memmap2 = "0.5.5" humantime = "2.1" -once_cell = "1.13" diff --git a/hypervisor/Cargo.toml b/hypervisor/Cargo.toml index a776f53..d7dbc55 100644 --- a/hypervisor/Cargo.toml +++ b/hypervisor/Cargo.toml @@ -13,27 +13,26 @@ a653rs.features = [ "bindings" ] #apex-hal = { path = "../../a653rs", features = ["p4"] } a653rs-linux-core = { path = "../core" } - # Required -nix = "0.25" +nix.workspace = true +memmap2.workspace = true +procfs.workspace = true +polling.workspace = true +itertools.workspace = true +once_cell.workspace = true anyhow = "1.0" tempfile = "3.3" clone3 = "0.2" serde = { version = "1.0", features = ["derive"] } libc = "0.2" -procfs = "0.14" -itertools = "0.10" clap = { version = "4", features = [ "derive" ] } serde_yaml = "0" -humantime = "1" +humantime = "2.1" humantime-serde = "1" -memmap2 = "0.5.5" log = "0" pretty_env_logger = "0.5" -quit = "1.1" +quit = "2.0" memfd = "0.6" num = "0.4" -once_cell = "1.13" -polling = "2.2" thiserror = "1.0" -which = "4.4.0" +which = "6.0" diff --git a/hypervisor/src/hypervisor/partition.rs b/hypervisor/src/hypervisor/partition.rs index bd0975e..5ce5702 100644 --- a/hypervisor/src/hypervisor/partition.rs +++ b/hypervisor/src/hypervisor/partition.rs @@ -15,7 +15,7 @@ use itertools::Itertools; use nix::mount::{mount, umount2, MntFlags, MsFlags}; use nix::sys::socket::{self, bind, AddressFamily, SockFlag, SockType, UnixAddr}; use nix::unistd::{chdir, close, pivot_root, setgid, setuid, Gid, Pid, Uid}; -use polling::{Event, Poller}; +use polling::{Event, Events, Poller}; use procfs::process::Process; use tempfile::{tempdir, TempDir}; @@ -308,7 +308,11 @@ impl Run { ) .unwrap(); - bind(syscall_socket, &UnixAddr::new(SYSCALL_SOCKET_PATH).unwrap()).unwrap(); + bind( + syscall_socket.as_raw_fd(), + &UnixAddr::new(SYSCALL_SOCKET_PATH).unwrap(), + ) + .unwrap(); let constants: RawFd = PartitionConstants { name: base.name.clone(), @@ -998,13 +1002,15 @@ impl PeriodicPoller { let events = run.periodic_events()?; let poll = Poller::new().typ(SystemError::Panic)?; - poll.add(events.as_raw_fd(), Event::readable(Self::EVENTS_ID)) + unsafe { + poll.add(events.as_raw_fd(), Event::readable(Self::EVENTS_ID)) + .typ(SystemError::Panic)?; + poll.add( + run.receiver().as_raw_fd(), + Event::readable(Self::RECEIVER_ID), + ) .typ(SystemError::Panic)?; - poll.add( - run.receiver().as_raw_fd(), - Event::readable(Self::RECEIVER_ID), - ) - .typ(SystemError::Panic)?; + } Ok(PeriodicPoller { poll, events }) } @@ -1015,18 +1021,18 @@ impl PeriodicPoller { } while timeout.has_time_left() { - let mut events = vec![]; + let mut events = Events::new(); self.poll - .wait(events.as_mut(), Some(timeout.remaining_time())) + .wait(&mut events, Some(timeout.remaining_time())) .typ(SystemError::Panic)?; - for e in events { + for e in events.iter() { match e.key { // Got a Frozen event Self::EVENTS_ID => { // Re-sub the readable event self.poll - .modify(self.events.as_raw_fd(), Event::readable(Self::EVENTS_ID)) + .modify(&mut self.events, Event::readable(Self::EVENTS_ID)) .typ(SystemError::Panic)?; // Then check if the cg is actually frozen @@ -1042,10 +1048,7 @@ impl PeriodicPoller { // accidentally missing an event (at the expense of one extra loop per // receive) self.poll - .modify( - run.receiver().as_raw_fd(), - Event::readable(Self::RECEIVER_ID), - ) + .modify(run.receiver(), Event::readable(Self::RECEIVER_ID)) .typ(SystemError::Panic)?; // Now receive anything diff --git a/hypervisor/src/hypervisor/syscall.rs b/hypervisor/src/hypervisor/syscall.rs index 44b4fd7..f42c4d0 100644 --- a/hypervisor/src/hypervisor/syscall.rs +++ b/hypervisor/src/hypervisor/syscall.rs @@ -1,6 +1,7 @@ //! Implementation of the mechanism to perform system calls use std::io::IoSliceMut; +use std::num::NonZeroUsize; use std::os::fd::RawFd; use std::time::{Duration, Instant}; @@ -10,7 +11,7 @@ use anyhow::{bail, Result}; use libc::EINTR; use nix::sys::socket::{recvmsg, ControlMessageOwned, MsgFlags}; use nix::{cmsg_space, unistd}; -use polling::{Event, Poller}; +use polling::{Event, Events, Poller}; /// Receives an FD triple from fd // TODO: Use generics here @@ -34,8 +35,8 @@ fn recv_fd_triple(fd: RawFd) -> Result<[RawFd; 3]> { /// Waits for readable data on fd fn wait_fds(fd: RawFd, timeout: Option) -> Result { let poller = Poller::new()?; - let mut events = Vec::with_capacity(1); - poller.add(fd, Event::readable(0))?; + let mut events = Events::with_capacity(NonZeroUsize::MIN); + unsafe { poller.add(fd, Event::readable(0))? }; loop { match poller.wait(&mut events, timeout) { Ok(0) => return Ok(false), @@ -106,6 +107,7 @@ pub fn handle(fd: RawFd, timeout: Option) -> Result { #[cfg(test)] mod tests { use std::io::IoSlice; + use std::os::fd::AsRawFd; use a653rs_linux_core::syscall::ApexSyscall; use nix::sys::eventfd::{eventfd, EfdFlags}; @@ -145,18 +147,20 @@ mod tests { // Send the fds to the responder { - let fds = [requ_fd.get_fd(), resp_fd.get_fd(), event_fd]; + let fds = [requ_fd.get_fd(), resp_fd.get_fd(), event_fd.as_raw_fd()]; let cmsg = [ControlMessage::ScmRights(&fds)]; let buffer = 0_u64.to_be_bytes(); let iov = [IoSlice::new(buffer.as_slice())]; - sendmsg::<()>(requester, &iov, &cmsg, MsgFlags::empty(), None).unwrap(); + sendmsg::<()>(requester.as_raw_fd(), &iov, &cmsg, MsgFlags::empty(), None).unwrap(); } // Wait for a response { let poller = Poller::new().unwrap(); - let mut events = Vec::with_capacity(1); - poller.add(event_fd, Event::readable(0)).unwrap(); + let mut events = Events::with_capacity(NonZeroUsize::MIN); + unsafe { + poller.add(&event_fd, Event::readable(0)).unwrap(); + } poller.wait(&mut events, None).unwrap(); assert_eq!(events.len(), 1); } @@ -167,7 +171,7 @@ mod tests { }); let response_thread = std::thread::spawn(move || { - let n = handle(responder, Some(Duration::from_secs(1))).unwrap(); + let n = handle(responder.as_raw_fd(), Some(Duration::from_secs(1))).unwrap(); assert_eq!(n, 1); }); diff --git a/hypervisor/src/lib.rs b/hypervisor/src/lib.rs index 7886b9e..935f77c 100644 --- a/hypervisor/src/lib.rs +++ b/hypervisor/src/lib.rs @@ -68,13 +68,8 @@ pub fn run_hypervisor() -> LeveledResult<()> { let cgroups = my_pid .cgroups() .expect("unable to retrieve my parent cgroup"); - let cgroup_path = cgroups - .iter() - .find(|c| c.hierarchy == 0) - .unwrap() - .pathname - .strip_prefix('/') - .unwrap(); // this can't fail, the cgroup reported will always start with a leading '/' + let cgroups = cgroups.into_iter().find(|c| c.hierarchy == 0).unwrap(); + let cgroup_path = cgroups.pathname.strip_prefix('/').unwrap(); // this can't fail, the cgroup reported will always start with a leading '/' cgroups_mount_point.join(cgroup_path) }); // Add Additional cgroup layer diff --git a/partition/Cargo.toml b/partition/Cargo.toml index 3a42ce9..81bb96f 100644 --- a/partition/Cargo.toml +++ b/partition/Cargo.toml @@ -13,13 +13,14 @@ socket = [] [dependencies] a653rs.workspace = true a653rs-linux-core = { path = "../core" } +nix.workspace = true +memmap2.workspace = true +procfs.workspace = true +polling.workspace = true +once_cell.workspace = true + lazy_static = "1.4" anyhow = "1.0" -nix = "0.25" -polling = "2.2" log.workspace = true -once_cell = "1.13" -memmap2 = "0.5.5" safemem = "0.3" -procfs = "0.14" tinyvec = "1.6" diff --git a/partition/src/lib.rs b/partition/src/lib.rs index 404423a..8bf5601 100644 --- a/partition/src/lib.rs +++ b/partition/src/lib.rs @@ -14,7 +14,7 @@ use std::net::{TcpStream, UdpSocket}; #[cfg(feature = "socket")] use a653rs_linux_core::ipc::IoReceiver; -use std::os::fd::RawFd; +use std::os::fd::{AsRawFd, IntoRawFd, RawFd}; use std::os::unix::prelude::FromRawFd; use std::time::{Duration, Instant}; @@ -116,9 +116,13 @@ pub(crate) static SYSCALL: Lazy = Lazy::new(|| { ) .unwrap(); - connect(syscall_socket, &UnixAddr::new(SYSCALL_SOCKET_PATH).unwrap()).unwrap(); + connect( + syscall_socket.as_raw_fd(), + &UnixAddr::new(SYSCALL_SOCKET_PATH).unwrap(), + ) + .unwrap(); - syscall_socket + syscall_socket.into_raw_fd() }); #[cfg(feature = "socket")] diff --git a/partition/src/process.rs b/partition/src/process.rs index 2fa887c..5123cb2 100644 --- a/partition/src/process.rs +++ b/partition/src/process.rs @@ -197,8 +197,10 @@ impl Process { }); // Make extra sure that the process is in the cgroup - let child = nix::sched::clone(cbk, stack, CloneFlags::empty(), Some(SIGCHLD)) - .lev_typ(SystemError::Panic, ErrorLevel::Partition)?; + let child = unsafe { + nix::sched::clone(cbk, stack, CloneFlags::empty(), Some(SIGCHLD)) + .lev_typ(SystemError::Panic, ErrorLevel::Partition)? + }; cg.mv(child).unwrap(); self.pid.write(&child).lev(ErrorLevel::Partition)?; diff --git a/partition/src/syscall.rs b/partition/src/syscall.rs index 39b7a01..9913763 100644 --- a/partition/src/syscall.rs +++ b/partition/src/syscall.rs @@ -3,6 +3,7 @@ // TODO: Document the mechanism here use std::io::IoSlice; +use std::num::NonZeroUsize; use std::os::fd::{AsRawFd, RawFd}; use a653rs_linux_core::mfd::{Mfd, Seals}; @@ -11,7 +12,7 @@ use anyhow::Result; use nix::libc::EINTR; use nix::sys::eventfd::{self, EfdFlags}; use nix::sys::socket::{sendmsg, ControlMessage, MsgFlags}; -use polling::{Event, Poller}; +use polling::{Event, Events, Poller}; use crate::SYSCALL; @@ -28,8 +29,10 @@ fn send_fds(hv: RawFd, fds: &[RawFd; COUNT]) -> Result<()> { // TODO: Consider timeout fn wait_event(event_fd: RawFd) -> Result<()> { let poller = Poller::new()?; - let mut events = Vec::with_capacity(1); - poller.add(event_fd, Event::readable(0))?; + let mut events = Events::with_capacity(NonZeroUsize::MIN); + unsafe { + poller.add(event_fd, Event::readable(0))?; + } loop { match poller.wait(&mut events, None) { @@ -64,14 +67,14 @@ fn execute_fd(fd: RawFd, requ: SyscallRequ) -> Result { &[requ_fd.get_fd(), resp_fd.get_fd(), event_fd.as_raw_fd()], )?; - wait_event(event_fd)?; + wait_event(event_fd.as_raw_fd())?; let resp = SyscallResp::deserialize(&resp_fd.read_all()?)?; Ok(resp) } pub fn execute(requ: SyscallRequ) -> Result { - execute_fd(*SYSCALL, requ) + execute_fd(SYSCALL.as_raw_fd(), requ) } #[cfg(test)] @@ -98,7 +101,7 @@ mod tests { let request_thread = std::thread::spawn(move || { let resp = execute_fd( - requester, + requester.as_raw_fd(), SyscallRequ { id: ApexSyscall::Start, params: vec![1, 2, 42], @@ -114,8 +117,13 @@ mod tests { let mut cmsg = cmsg_space!([RawFd; 3]); let mut iobuf = [0u8]; let mut iov = [IoSliceMut::new(&mut iobuf)]; - let res = - recvmsg::<()>(responder, &mut iov, Some(&mut cmsg), MsgFlags::empty()).unwrap(); + let res = recvmsg::<()>( + responder.as_raw_fd(), + &mut iov, + Some(&mut cmsg), + MsgFlags::empty(), + ) + .unwrap(); let fds: Vec = match res.cmsgs().next().unwrap() { ControlMessageOwned::ScmRights(fds) => fds.to_vec(),