diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index 37e7dfd..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,3655 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "allocator-api2" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" - -[[package]] -name = "anstream" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" - -[[package]] -name = "anstyle-parse" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - -[[package]] -name = "anyhow" -version = "1.0.86" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" -dependencies = [ - "serde", -] - -[[package]] -name = "async-compression" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" -dependencies = [ - "flate2", - "futures-core", - "memchr", - "pin-project-lite", - "tokio", - "zstd", - "zstd-safe", -] - -[[package]] -name = "async-stream" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.57", -] - -[[package]] -name = "async-trait" -version = "0.1.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.57", -] - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "autocfg" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" - -[[package]] -name = "axum" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" -dependencies = [ - "async-trait", - "axum-core", - "bytes", - "futures-util", - "http", - "http-body", - "http-body-util", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper 1.0.1", - "tower", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-core" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http", - "http-body", - "http-body-util", - "mime", - "pin-project-lite", - "rustversion", - "sync_wrapper 0.1.2", - "tower-layer", - "tower-service", -] - -[[package]] -name = "backhand" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f2fc1bc7bb7fd449e02000cc1592cc63dcdcd61710f8b9efe32bab2d1784603" -dependencies = [ - "deku", - "flate2", - "rustc-hash", - "thiserror", - "tracing", - "xz2", - "zstd", - "zstd-safe", -] - -[[package]] -name = "backtrace" -version = "0.3.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" - -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bumpalo" -version = "3.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" - -[[package]] -name = "c2rust-bitfields" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b43c3f07ab0ef604fa6f595aa46ec2f8a22172c975e186f6f5bf9829a3b72c41" -dependencies = [ - "c2rust-bitfields-derive", -] - -[[package]] -name = "c2rust-bitfields-derive" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3cbc102e2597c9744c8bd8c15915d554300601c91a079430d309816b0912545" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "cassowary" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" - -[[package]] -name = "castaway" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a17ed5635fc8536268e5d4de1e22e81ac34419e5f052d4d51f4e01dcc263fcc" -dependencies = [ - "rustversion", -] - -[[package]] -name = "cc" -version = "1.0.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" -dependencies = [ - "jobserver", - "libc", -] - -[[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 = "cgroups-rs" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db7c2f5545da4c12c5701455d9471da5f07db52e49b9cccb4f5512226dd0836" -dependencies = [ - "libc", - "log", - "nix 0.25.1", - "regex", - "thiserror", -] - -[[package]] -name = "circular-buffer" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da987586004ae7c43b7df5e3f7693775068522e1086f8d9b2d74c778a0f43313" - -[[package]] -name = "clap" -version = "4.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d8838454fda655dafd3accb2b6e2bea645b9e4078abe84a22ceb947235c5cc" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim 0.11.0", -] - -[[package]] -name = "clap_derive" -version = "4.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.57", -] - -[[package]] -name = "clap_lex" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" - -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - -[[package]] -name = "comfy-table" -version = "7.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b34115915337defe99b2aff5c2ce6771e5fbc4079f4b506301f5cf394c8452f7" -dependencies = [ - "crossterm", - "strum", - "strum_macros", - "unicode-width", -] - -[[package]] -name = "compact_str" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f86b9c4c00838774a6d902ef931eff7470720c51d90c2e32cfe15dc304737b3f" -dependencies = [ - "castaway", - "cfg-if", - "itoa", - "ryu", - "static_assertions", -] - -[[package]] -name = "console" -version = "0.15.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "unicode-width", - "windows-sys 0.52.0", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" - -[[package]] -name = "crossterm" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" -dependencies = [ - "bitflags 2.5.0", - "crossterm_winapi", - "futures-core", - "libc", - "mio 0.8.11", - "parking_lot", - "signal-hook", - "signal-hook-mio", - "winapi", -] - -[[package]] -name = "crossterm_winapi" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" -dependencies = [ - "winapi", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "ctrlc" -version = "3.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3" -dependencies = [ - "nix 0.29.0", - "windows-sys 0.59.0", -] - -[[package]] -name = "darling" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 2.0.57", -] - -[[package]] -name = "darling_macro" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.57", -] - -[[package]] -name = "defmt" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3939552907426de152b3c2c6f51ed53f98f448babd26f28694c95f5906194595" -dependencies = [ - "bitflags 1.3.2", - "defmt-macros", -] - -[[package]] -name = "defmt-macros" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18bdc7a7b92ac413e19e95240e75d3a73a8d8e78aa24a594c22cbb4d44b4bbda" -dependencies = [ - "defmt-parser", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.57", -] - -[[package]] -name = "defmt-parser" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4a5fefe330e8d7f31b16a318f9ce81000d8e35e69b93eae154d16d2278f70f" -dependencies = [ - "thiserror", -] - -[[package]] -name = "deku" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "709ade444d53896e60f6265660eb50480dd08b77bfc822e5dcc233b88b0b2fba" -dependencies = [ - "bitvec", - "deku_derive", - "no_std_io", - "rustversion", -] - -[[package]] -name = "deku_derive" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7534973f93f9de83203e41c8ddd32d230599fa73fa889f3deb1580ccd186913" -dependencies = [ - "darling", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.57", -] - -[[package]] -name = "derive_builder" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.57", -] - -[[package]] -name = "derive_builder_macro" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" -dependencies = [ - "derive_builder_core", - "syn 2.0.57", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "either" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" - -[[package]] -name = "elf" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4445909572dbd556c457c849c4ca58623d84b27c8fff1e74b0b4227d8b90d17b" - -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - -[[package]] -name = "env_filter" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" -dependencies = [ - "log", - "regex", -] - -[[package]] -name = "env_logger" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" -dependencies = [ - "anstream", - "anstyle", - "env_filter", - "humantime", - "log", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "etherparse" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21696e6dfe1057a166a042c6d27b89a46aad2ee1003e6e1e03c49d54fd3270d7" -dependencies = [ - "arrayvec", -] - -[[package]] -name = "fancy-duration" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3ae60718ae501dca9d27fd0e322683c86a95a1a01fac1807aa2f9b035cc0882" -dependencies = [ - "anyhow", - "lazy_static", - "regex", -] - -[[package]] -name = "fastrand" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" - -[[package]] -name = "filetime" -version = "0.2.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", -] - -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - -[[package]] -name = "flate2" -version = "1.0.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "futures" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" - -[[package]] -name = "futures-macro" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.57", -] - -[[package]] -name = "futures-sink" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "getset" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "h2" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http", - "indexmap 2.4.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hash32" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" -dependencies = [ - "byteorder", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" -dependencies = [ - "ahash", - "allocator-api2", -] - -[[package]] -name = "heapless" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" -dependencies = [ - "hash32", - "stable_deref_trait", -] - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" -dependencies = [ - "bytes", - "futures-core", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "human_bytes" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91f255a4535024abf7640cb288260811fc14794f62b063652ed349f9a6c2348e" - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "hyper" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" -dependencies = [ - "futures-util", - "http", - "hyper", - "hyper-util", - "rustls", - "rustls-pki-types", - "tokio", - "tokio-rustls", - "tower-service", - "webpki-roots", -] - -[[package]] -name = "hyper-timeout" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" -dependencies = [ - "hyper", - "hyper-util", - "pin-project-lite", - "tokio", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "hyper", - "pin-project-lite", - "socket2", - "tokio", - "tower", - "tower-service", - "tracing", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" -dependencies = [ - "equivalent", - "hashbrown 0.14.3", -] - -[[package]] -name = "indicatif" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" -dependencies = [ - "console", - "instant", - "number_prefix", - "portable-atomic", - "unicode-width", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "ipnet" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" - -[[package]] -name = "ipnetwork" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf466541e9d546596ee94f9f69590f89473455f88372423e0008fc1a7daf100e" -dependencies = [ - "serde", -] - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "jobserver" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "krata" -version = "0.0.15" -dependencies = [ - "anyhow", - "async-trait", - "bytes", - "hyper", - "hyper-util", - "libc", - "log", - "nix 0.29.0", - "once_cell", - "pin-project-lite", - "prost", - "prost-build", - "prost-reflect", - "prost-reflect-build", - "prost-types", - "scopeguard", - "serde", - "tokio", - "tokio-stream", - "tonic", - "tonic-build", - "tower", - "url", -] - -[[package]] -name = "krata-advmac" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93156fad4bb9474729fd9f076d7ec2fd573747bc3c3535fd2a085113c071211a" -dependencies = [ - "arrayvec", - "rand", - "serde", -] - -[[package]] -name = "krata-buildtools" -version = "0.0.15" -dependencies = [ - "anyhow", - "env_logger", - "krata-oci", - "krata-tokio-tar", - "oci-spec", - "scopeguard", - "tokio", - "tokio-stream", - "uuid", -] - -[[package]] -name = "krata-ctl" -version = "0.0.15" -dependencies = [ - "anyhow", - "async-stream", - "base64 0.22.1", - "clap", - "comfy-table", - "crossterm", - "ctrlc", - "env_logger", - "fancy-duration", - "human_bytes", - "indicatif", - "krata", - "log", - "prost-reflect", - "prost-types", - "ratatui", - "serde", - "serde_json", - "serde_yaml", - "termtree", - "tokio", - "tokio-stream", - "tonic", - "tower", -] - -[[package]] -name = "krata-daemon" -version = "0.0.15" -dependencies = [ - "anyhow", - "async-stream", - "async-trait", - "bytes", - "circular-buffer", - "clap", - "env_logger", - "futures", - "krata", - "krata-oci", - "krata-runtime", - "krata-tokio-tar", - "log", - "prost", - "redb", - "scopeguard", - "serde", - "signal-hook", - "tokio", - "tokio-stream", - "toml", - "tonic", - "uuid", -] - -[[package]] -name = "krata-loopdev" -version = "0.0.15" -dependencies = [ - "libc", -] - -[[package]] -name = "krata-network" -version = "0.0.15" -dependencies = [ - "anyhow", - "async-trait", - "bytes", - "clap", - "env_logger", - "etherparse", - "futures", - "krata", - "krata-advmac", - "libc", - "log", - "rtnetlink", - "smoltcp", - "tokio", - "tokio-tun", - "tonic", - "udp-stream", - "uuid", -] - -[[package]] -name = "krata-oci" -version = "0.0.15" -dependencies = [ - "anyhow", - "async-compression", - "async-trait", - "backhand", - "bytes", - "env_logger", - "indexmap 2.4.0", - "krata-tokio-tar", - "log", - "oci-spec", - "path-clean", - "reqwest", - "scopeguard", - "serde", - "serde_json", - "sha256", - "tokio", - "tokio-stream", - "url", - "uuid", - "walkdir", -] - -[[package]] -name = "krata-runtime" -version = "0.0.15" -dependencies = [ - "anyhow", - "backhand", - "env_logger", - "indexmap 2.4.0", - "ipnetwork", - "krata", - "krata-advmac", - "krata-loopdev", - "krata-oci", - "krata-xencall", - "krata-xenclient", - "krata-xenevtchn", - "krata-xengnt", - "krata-xenplatform", - "krata-xenstore", - "log", - "serde_json", - "tokio", - "uuid", - "walkdir", -] - -[[package]] -name = "krata-tokio-tar" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba844968838c1c5892da2116e5f744bceab2b43af34539abdd6cd3975eaca973" -dependencies = [ - "filetime", - "futures-core", - "libc", - "redox_syscall 0.3.5", - "tokio", - "tokio-stream", - "xattr", -] - -[[package]] -name = "krata-xencall" -version = "0.0.15" -dependencies = [ - "env_logger", - "libc", - "log", - "nix 0.29.0", - "thiserror", - "tokio", - "uuid", -] - -[[package]] -name = "krata-xenclient" -version = "0.0.15" -dependencies = [ - "async-trait", - "env_logger", - "indexmap 2.4.0", - "krata-xencall", - "krata-xenplatform", - "krata-xenstore", - "libc", - "log", - "regex", - "thiserror", - "tokio", - "uuid", -] - -[[package]] -name = "krata-xenevtchn" -version = "0.0.15" -dependencies = [ - "byteorder", - "libc", - "log", - "nix 0.29.0", - "thiserror", - "tokio", -] - -[[package]] -name = "krata-xengnt" -version = "0.0.15" -dependencies = [ - "libc", - "nix 0.29.0", - "thiserror", -] - -[[package]] -name = "krata-xenplatform" -version = "0.0.15" -dependencies = [ - "async-trait", - "c2rust-bitfields", - "elf", - "env_logger", - "flate2", - "indexmap 2.4.0", - "krata-xencall", - "libc", - "log", - "memchr", - "nix 0.29.0", - "regex", - "slice-copy", - "thiserror", - "tokio", - "uuid", - "xz2", -] - -[[package]] -name = "krata-xenstore" -version = "0.0.15" -dependencies = [ - "byteorder", - "env_logger", - "libc", - "log", - "thiserror", - "tokio", -] - -[[package]] -name = "krata-zone" -version = "0.0.15" -dependencies = [ - "anyhow", - "cgroups-rs", - "env_logger", - "futures", - "ipnetwork", - "krata", - "krata-xenstore", - "libc", - "log", - "nix 0.29.0", - "oci-spec", - "path-absolutize", - "platform-info", - "rtnetlink", - "serde", - "serde_json", - "sys-mount", - "sysinfo", - "tokio", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.155" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" - -[[package]] -name = "linux-raw-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" - -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" - -[[package]] -name = "lru" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" -dependencies = [ - "hashbrown 0.14.3", -] - -[[package]] -name = "lzma-sys" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - -[[package]] -name = "managed" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca88d725a0a943b096803bd34e73a4437208b6077654cc4ecb2947a5f91618d" - -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "log", - "wasi", - "windows-sys 0.48.0", -] - -[[package]] -name = "mio" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" -dependencies = [ - "hermit-abi", - "libc", - "wasi", - "windows-sys 0.52.0", -] - -[[package]] -name = "multimap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" - -[[package]] -name = "netlink-packet-core" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72724faf704479d67b388da142b186f916188505e7e0b26719019c525882eda4" -dependencies = [ - "anyhow", - "byteorder", - "netlink-packet-utils", -] - -[[package]] -name = "netlink-packet-route" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74c171cd77b4ee8c7708da746ce392440cb7bcf618d122ec9ecc607b12938bf4" -dependencies = [ - "anyhow", - "byteorder", - "libc", - "log", - "netlink-packet-core", - "netlink-packet-utils", -] - -[[package]] -name = "netlink-packet-utils" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ede8a08c71ad5a95cdd0e4e52facd37190977039a4704eb82a283f713747d34" -dependencies = [ - "anyhow", - "byteorder", - "paste", - "thiserror", -] - -[[package]] -name = "netlink-proto" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b33524dc0968bfad349684447bfce6db937a9ac3332a1fe60c0c5a5ce63f21" -dependencies = [ - "bytes", - "futures", - "log", - "netlink-packet-core", - "netlink-sys", - "thiserror", - "tokio", -] - -[[package]] -name = "netlink-sys" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" -dependencies = [ - "bytes", - "futures", - "libc", - "log", - "tokio", -] - -[[package]] -name = "nix" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "libc", -] - -[[package]] -name = "nix" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" -dependencies = [ - "bitflags 2.5.0", - "cfg-if", - "libc", -] - -[[package]] -name = "nix" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" -dependencies = [ - "bitflags 2.5.0", - "cfg-if", - "cfg_aliases", - "libc", -] - -[[package]] -name = "no_std_io" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fa5f306a6f2c01b4fd172f29bb46195b1764061bf926c75e96ff55df3178208" -dependencies = [ - "memchr", -] - -[[package]] -name = "ntapi" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" -dependencies = [ - "winapi", -] - -[[package]] -name = "num-traits" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" -dependencies = [ - "autocfg", -] - -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - -[[package]] -name = "oci-spec" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f5a3fe998d50101ae009351fec56d88a69f4ed182e11000e711068c2f5abf72" -dependencies = [ - "derive_builder", - "getset", - "once_cell", - "regex", - "serde", - "serde_json", - "strum", - "strum_macros", - "thiserror", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "ordered-float" -version = "2.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" -dependencies = [ - "num-traits", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.4.1", - "smallvec", - "windows-targets 0.48.5", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "path-absolutize" -version = "3.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4af381fe79fa195b4909485d99f73a80792331df0625188e707854f0b3383f5" -dependencies = [ - "path-dedot", -] - -[[package]] -name = "path-clean" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef" - -[[package]] -name = "path-dedot" -version = "3.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ba0ad7e047712414213ff67533e6dd477af0a4e1d14fb52343e53d30ea9397" -dependencies = [ - "once_cell", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "petgraph" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" -dependencies = [ - "fixedbitset", - "indexmap 2.4.0", -] - -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.57", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" - -[[package]] -name = "platform-info" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5ff316b9c4642feda973c18f0decd6c8b0919d4722566f6e4337cce0dd88217" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "portable-atomic" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "prettyplease" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" -dependencies = [ - "proc-macro2", - "syn 2.0.57", -] - -[[package]] -name = "proc-macro-crate" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" -dependencies = [ - "toml_edit 0.21.1", -] - -[[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", -] - -[[package]] -name = "proc-macro2" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "prost" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-build" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb182580f71dd070f88d01ce3de9f4da5021db7115d2e1c3605a754153b77c1" -dependencies = [ - "bytes", - "heck", - "itertools 0.13.0", - "log", - "multimap", - "once_cell", - "petgraph", - "prettyplease", - "prost", - "prost-types", - "regex", - "syn 2.0.57", - "tempfile", -] - -[[package]] -name = "prost-derive" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" -dependencies = [ - "anyhow", - "itertools 0.13.0", - "proc-macro2", - "quote", - "syn 2.0.57", -] - -[[package]] -name = "prost-reflect" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55a6a9143ae25c25fa7b6a48d6cc08b10785372060009c25140a4e7c340e95af" -dependencies = [ - "base64 0.22.1", - "once_cell", - "prost", - "prost-reflect-derive", - "prost-types", - "serde", - "serde-value", -] - -[[package]] -name = "prost-reflect-build" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e2537231d94dd2778920c2ada37dd9eb1ac0325bb3ee3ee651bd44c1134123" -dependencies = [ - "prost-build", - "prost-reflect", -] - -[[package]] -name = "prost-reflect-derive" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fce6b22f15cc8d8d400a2b98ad29202b33bd56c7d9ddd815bc803a807ecb65" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.57", -] - -[[package]] -name = "prost-types" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2" -dependencies = [ - "prost", -] - -[[package]] -name = "quinn" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ceeeeabace7857413798eb1ffa1e9c905a9946a57d81fb69b4b71c4d8eb3ad" -dependencies = [ - "bytes", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash", - "rustls", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "quinn-proto" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddf517c03a109db8100448a4be38d498df8a210a99fe0e1b9eaf39e78c640efe" -dependencies = [ - "bytes", - "rand", - "ring", - "rustc-hash", - "rustls", - "slab", - "thiserror", - "tinyvec", - "tracing", -] - -[[package]] -name = "quinn-udp" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9096629c45860fc7fb143e125eb826b5e721e10be3263160c7d60ca832cf8c46" -dependencies = [ - "libc", - "once_cell", - "socket2", - "tracing", - "windows-sys 0.52.0", -] - -[[package]] -name = "quote" -version = "1.0.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "ratatui" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16546c5b5962abf8ce6e2881e722b4e0ae3b6f1a08a26ae3573c55853ca68d3" -dependencies = [ - "bitflags 2.5.0", - "cassowary", - "compact_str", - "crossterm", - "itertools 0.13.0", - "lru", - "paste", - "stability", - "strum", - "strum_macros", - "unicode-segmentation", - "unicode-truncate", - "unicode-width", -] - -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "redb" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6dd20d3cdeb9c7d2366a0b16b93b35b75aec15309fbeb7ce477138c9f68c8c0" -dependencies = [ - "libc", -] - -[[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 = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "regex" -version = "1.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" - -[[package]] -name = "reqwest" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" -dependencies = [ - "base64 0.22.1", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-util", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "quinn", - "rustls", - "rustls-pemfile", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 1.0.1", - "tokio", - "tokio-rustls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots", - "winreg", -] - -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if", - "getrandom", - "libc", - "spin", - "untrusted", - "windows-sys 0.52.0", -] - -[[package]] -name = "rtnetlink" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b684475344d8df1859ddb2d395dd3dac4f8f3422a1aa0725993cb375fc5caba5" -dependencies = [ - "futures", - "log", - "netlink-packet-core", - "netlink-packet-route", - "netlink-packet-utils", - "netlink-proto", - "netlink-sys", - "nix 0.27.1", - "thiserror", - "tokio", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustix" -version = "0.38.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" -dependencies = [ - "bitflags 2.5.0", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustls" -version = "0.23.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebbbdb961df0ad3f2652da8f3fdc4b36122f568f968f45ad3316f26c025c677b" -dependencies = [ - "log", - "once_cell", - "ring", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-pemfile" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f48172685e6ff52a556baa527774f61fcaa884f59daf3375c62a3f1cd2549dab" -dependencies = [ - "base64 0.21.7", - "rustls-pki-types", -] - -[[package]] -name = "rustls-pki-types" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247" - -[[package]] -name = "rustls-webpki" -version = "0.102.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - -[[package]] -name = "rustversion" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" - -[[package]] -name = "ryu" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "serde" -version = "1.0.207" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5665e14a49a4ea1b91029ba7d3bca9f299e1f7cfa194388ccc20f14743e784f2" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde-value" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" -dependencies = [ - "ordered-float", - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.207" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.57", -] - -[[package]] -name = "serde_json" -version = "1.0.124" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66ad62847a56b3dba58cc891acd13884b9c61138d330c0d7b6181713d4fce38d" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "serde_spanned" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" -dependencies = [ - "indexmap 2.4.0", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha256" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18278f6a914fa3070aa316493f7d2ddfb9ac86ebc06fa3b83bffda487e9065b0" -dependencies = [ - "async-trait", - "bytes", - "hex", - "sha2", - "tokio", -] - -[[package]] -name = "signal-hook" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" -dependencies = [ - "libc", - "signal-hook-registry", -] - -[[package]] -name = "signal-hook-mio" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" -dependencies = [ - "libc", - "mio 0.8.11", - "signal-hook", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "slice-copy" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e00f4662cdca2d22cf4ec4f25c287191de801031d3b08f6dcd85662c10d07a" - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "smart-default" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eb01866308440fc64d6c44d9e86c5cc17adfe33c4d6eed55da9145044d0ffc1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.57", -] - -[[package]] -name = "smoltcp" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a1a996951e50b5971a2c8c0fa05a381480d70a933064245c4a223ddc87ccc97" -dependencies = [ - "bitflags 1.3.2", - "byteorder", - "cfg-if", - "defmt", - "heapless", - "libc", - "log", - "managed", -] - -[[package]] -name = "socket2" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "stability" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ff9eaf853dec4c8802325d8b6d3dffa86cc707fd7a1a4cdbf416e13b061787a" -dependencies = [ - "quote", - "syn 2.0.57", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strsim" -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.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.57", -] - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[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", -] - -[[package]] -name = "syn" -version = "2.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11a6ae1e52eb25aab8f3fb9fca13be982a373b8f1157ca14b897a825ba4a2d35" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "sync_wrapper" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" - -[[package]] -name = "sys-mount" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6acb8bb63826062d5a44b68298cf2e25b84bc151bc0c31c35a83b61f818682a" -dependencies = [ - "bitflags 2.5.0", - "libc", - "smart-default", - "thiserror", - "tracing", -] - -[[package]] -name = "sysinfo" -version = "0.30.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a5b4ddaee55fb2bea2bf0e5000747e5f5c0de765e5a5ff87f4cd106439f4bb3" -dependencies = [ - "cfg-if", - "core-foundation-sys", - "libc", - "ntapi", - "once_cell", - "rayon", - "windows", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tempfile" -version = "3.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" -dependencies = [ - "cfg-if", - "fastrand", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "termtree" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" - -[[package]] -name = "thiserror" -version = "1.0.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.57", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio 1.0.1", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.52.0", -] - -[[package]] -name = "tokio-macros" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.57", -] - -[[package]] -name = "tokio-rustls" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" -dependencies = [ - "rustls", - "rustls-pki-types", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-tun" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5381752d5832fc811f89d54fc334951aa435022f494190ba7151661f206df" -dependencies = [ - "libc", - "nix 0.29.0", - "thiserror", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - -[[package]] -name = "toml" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.22.20", -] - -[[package]] -name = "toml_datetime" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap 2.4.0", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" -dependencies = [ - "indexmap 2.4.0", - "serde", - "serde_spanned", - "toml_datetime", - "winnow 0.6.18", -] - -[[package]] -name = "tonic" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38659f4a91aba8598d27821589f5db7dddd94601e7a01b1e485a50e5484c7401" -dependencies = [ - "async-stream", - "async-trait", - "axum", - "base64 0.22.1", - "bytes", - "h2", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-timeout", - "hyper-util", - "percent-encoding", - "pin-project", - "prost", - "rustls-pemfile", - "socket2", - "tokio", - "tokio-rustls", - "tokio-stream", - "tower", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tonic-build" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "568392c5a2bd0020723e3f387891176aabafe36fd9fcd074ad309dfa0c8eb964" -dependencies = [ - "prettyplease", - "proc-macro2", - "prost-build", - "quote", - "syn 2.0.57", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "indexmap 1.9.3", - "pin-project", - "pin-project-lite", - "rand", - "slab", - "tokio", - "tokio-util", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "log", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.57", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "udp-stream" -version = "0.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf021324a3dc10f5b46ab1c1cf5635e6a81b5559971967b806674673a5f2a18e" -dependencies = [ - "bytes", - "log", - "tokio", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" - -[[package]] -name = "unicode-truncate" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5fbabedabe362c618c714dbefda9927b5afc8e2a8102f47f081089a9019226" -dependencies = [ - "itertools 0.12.1", - "unicode-width", -] - -[[package]] -name = "unicode-width" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" - -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "url" -version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "uuid" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" -dependencies = [ - "getrandom", -] - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.57", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.57", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" - -[[package]] -name = "web-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki-roots" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" -dependencies = [ - "rustls-pki-types", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" -dependencies = [ - "windows-core", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - -[[package]] -name = "winnow" -version = "0.6.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - -[[package]] -name = "xattr" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" -dependencies = [ - "libc", - "linux-raw-sys", - "rustix", -] - -[[package]] -name = "xz2" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2" -dependencies = [ - "lzma-sys", -] - -[[package]] -name = "zerocopy" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.57", -] - -[[package]] -name = "zeroize" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" - -[[package]] -name = "zstd" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "7.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" -dependencies = [ - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/crates/ctl/src/cli/host/cpu_topology.rs b/crates/ctl/src/cli/host/cpu_topology.rs index 253ad2f..cf7911b 100644 --- a/crates/ctl/src/cli/host/cpu_topology.rs +++ b/crates/ctl/src/cli/host/cpu_topology.rs @@ -3,7 +3,7 @@ use clap::{Parser, ValueEnum}; use comfy_table::presets::UTF8_FULL_CONDENSED; use comfy_table::{Cell, Table}; use krata::v1::control::{ - control_service_client::ControlServiceClient, HostCpuTopologyClass, HostCpuTopologyRequest, + control_service_client::ControlServiceClient, GetHostCpuTopologyRequest, HostCpuTopologyClass, }; use tonic::{transport::Channel, Request}; @@ -31,7 +31,7 @@ pub struct HostCpuTopologyCommand { impl HostCpuTopologyCommand { pub async fn run(self, mut client: ControlServiceClient) -> Result<()> { let response = client - .get_host_cpu_topology(Request::new(HostCpuTopologyRequest {})) + .get_host_cpu_topology(Request::new(GetHostCpuTopologyRequest {})) .await? .into_inner(); diff --git a/crates/ctl/src/cli/host/identify.rs b/crates/ctl/src/cli/host/identify.rs index caf60f5..858bbee 100644 --- a/crates/ctl/src/cli/host/identify.rs +++ b/crates/ctl/src/cli/host/identify.rs @@ -1,17 +1,17 @@ use anyhow::Result; use clap::Parser; -use krata::v1::control::{control_service_client::ControlServiceClient, IdentifyHostRequest}; +use krata::v1::control::{control_service_client::ControlServiceClient, HostStatusRequest}; use tonic::{transport::Channel, Request}; #[derive(Parser)] -#[command(about = "Identify information about the host")] -pub struct HostIdentifyCommand {} +#[command(about = "Get information about the host")] +pub struct HostStatusCommand {} -impl HostIdentifyCommand { +impl HostStatusCommand { pub async fn run(self, mut client: ControlServiceClient) -> Result<()> { let response = client - .identify_host(Request::new(IdentifyHostRequest {})) + .host_status(Request::new(HostStatusRequest {})) .await? .into_inner(); println!("Host UUID: {}", response.host_uuid); diff --git a/crates/ctl/src/cli/host/mod.rs b/crates/ctl/src/cli/host/mod.rs index ca6d853..9c08dbe 100644 --- a/crates/ctl/src/cli/host/mod.rs +++ b/crates/ctl/src/cli/host/mod.rs @@ -6,7 +6,7 @@ use krata::events::EventStream; use krata::v1::control::control_service_client::ControlServiceClient; use crate::cli::host::cpu_topology::HostCpuTopologyCommand; -use crate::cli::host::identify::HostIdentifyCommand; +use crate::cli::host::identify::HostStatusCommand; use crate::cli::host::idm_snoop::HostIdmSnoopCommand; pub mod cpu_topology; @@ -33,7 +33,7 @@ impl HostCommand { #[derive(Subcommand)] pub enum HostCommands { CpuTopology(HostCpuTopologyCommand), - Identify(HostIdentifyCommand), + Status(HostStatusCommand), IdmSnoop(HostIdmSnoopCommand), } @@ -46,7 +46,7 @@ impl HostCommands { match self { HostCommands::CpuTopology(cpu_topology) => cpu_topology.run(client).await, - HostCommands::Identify(identify) => identify.run(client).await, + HostCommands::Status(status) => status.run(client).await, HostCommands::IdmSnoop(snoop) => snoop.run(client, events).await, } diff --git a/crates/ctl/src/cli/mod.rs b/crates/ctl/src/cli/mod.rs index 80dab51..8f68ef8 100644 --- a/crates/ctl/src/cli/mod.rs +++ b/crates/ctl/src/cli/mod.rs @@ -12,7 +12,7 @@ use clap::Parser; use krata::{ client::ControlClientProvider, events::EventStream, - v1::control::{control_service_client::ControlServiceClient, ResolveZoneRequest}, + v1::control::{control_service_client::ControlServiceClient, ResolveZoneIdRequest}, }; use tonic::{transport::Channel, Request}; @@ -61,14 +61,14 @@ pub async fn resolve_zone( name: &str, ) -> Result { let reply = client - .resolve_zone(Request::new(ResolveZoneRequest { + .resolve_zone_id(Request::new(ResolveZoneIdRequest { name: name.to_string(), })) .await? .into_inner(); - if let Some(zone) = reply.zone { - Ok(zone.id) + if !reply.zone_id.is_empty() { + Ok(reply.zone_id) } else { Err(anyhow!("unable to resolve zone '{}'", name)) } diff --git a/crates/ctl/src/cli/zone/destroy.rs b/crates/ctl/src/cli/zone/destroy.rs index de5d59f..543618a 100644 --- a/crates/ctl/src/cli/zone/destroy.rs +++ b/crates/ctl/src/cli/zone/destroy.rs @@ -2,20 +2,16 @@ use anyhow::Result; use clap::Parser; use krata::{ events::EventStream, - v1::{ - common::ZoneStatus, - control::{ - control_service_client::ControlServiceClient, watch_events_reply::Event, - DestroyZoneRequest, - }, + v1::control::{ + control_service_client::ControlServiceClient, watch_events_reply::Event, DestroyZoneRequest, }, }; +use crate::cli::resolve_zone; +use krata::v1::common::ZoneState; use log::error; use tonic::{transport::Channel, Request}; -use crate::cli::resolve_zone; - #[derive(Parser)] #[command(about = "Destroy a zone")] pub struct ZoneDestroyCommand { @@ -61,12 +57,12 @@ async fn wait_zone_destroyed(id: &str, events: EventStream) -> Result<()> { continue; } - let Some(state) = zone.state else { + let Some(status) = zone.status else { continue; }; - if let Some(ref error) = state.error_info { - if state.status() == ZoneStatus::Failed { + if let Some(ref error) = status.error_status { + if status.state() == ZoneState::Failed { error!("destroy failed: {}", error.message); std::process::exit(1); } else { @@ -74,7 +70,7 @@ async fn wait_zone_destroyed(id: &str, events: EventStream) -> Result<()> { } } - if state.status() == ZoneStatus::Destroyed { + if status.state() == ZoneState::Destroyed { std::process::exit(0); } } diff --git a/crates/ctl/src/cli/zone/exec.rs b/crates/ctl/src/cli/zone/exec.rs index 0cd4b63..e0ba4bf 100644 --- a/crates/ctl/src/cli/zone/exec.rs +++ b/crates/ctl/src/cli/zone/exec.rs @@ -5,7 +5,7 @@ use anyhow::Result; use clap::Parser; use krata::v1::{ common::{ZoneTaskSpec, ZoneTaskSpecEnvVar}, - control::{control_service_client::ControlServiceClient, ExecZoneRequest}, + control::{control_service_client::ControlServiceClient, ExecInsideZoneRequest}, }; use tonic::{transport::Channel, Request}; @@ -34,7 +34,7 @@ pub struct ZoneExecCommand { impl ZoneExecCommand { pub async fn run(self, mut client: ControlServiceClient) -> Result<()> { let zone_id: String = resolve_zone(&mut client, &self.zone).await?; - let initial = ExecZoneRequest { + let initial = ExecInsideZoneRequest { zone_id, task: Some(ZoneTaskSpec { environment: env_map(&self.env.unwrap_or_default()) @@ -52,7 +52,10 @@ impl ZoneExecCommand { let stream = StdioConsoleStream::stdin_stream_exec(initial).await; - let response = client.exec_zone(Request::new(stream)).await?.into_inner(); + let response = client + .exec_inside_zone(Request::new(stream)) + .await? + .into_inner(); let code = StdioConsoleStream::exec_output(response).await?; std::process::exit(code); diff --git a/crates/ctl/src/cli/zone/launch.rs b/crates/ctl/src/cli/zone/launch.rs index 53ca8b2..611cd3a 100644 --- a/crates/ctl/src/cli/zone/launch.rs +++ b/crates/ctl/src/cli/zone/launch.rs @@ -7,7 +7,7 @@ use krata::{ v1::{ common::{ zone_image_spec::Image, OciImageFormat, ZoneImageSpec, ZoneOciImageSpec, ZoneSpec, - ZoneSpecDevice, ZoneStatus, ZoneTaskSpec, ZoneTaskSpecEnvVar, + ZoneSpecDevice, ZoneState, ZoneTaskSpec, ZoneTaskSpecEnvVar, }, control::{ control_service_client::ControlServiceClient, watch_events_reply::Event, @@ -120,7 +120,7 @@ impl ZoneLaunchCommand { image: Some(image), kernel, initrd, - vcpus: self.cpus, + cpus: self.cpus, mem: self.mem, task: Some(ZoneTaskSpec { environment: env_map(&self.env.unwrap_or_default()) @@ -209,12 +209,12 @@ async fn wait_zone_started(id: &str, events: EventStream) -> Result<()> { continue; } - let Some(state) = zone.state else { + let Some(status) = zone.status else { continue; }; - if let Some(ref error) = state.error_info { - if state.status() == ZoneStatus::Failed { + if let Some(ref error) = status.error_status { + if status.state() == ZoneState::Failed { error!("launch failed: {}", error.message); std::process::exit(1); } else { @@ -222,12 +222,12 @@ async fn wait_zone_started(id: &str, events: EventStream) -> Result<()> { } } - if state.status() == ZoneStatus::Destroyed { + if status.state() == ZoneState::Destroyed { error!("zone destroyed"); std::process::exit(1); } - if state.status() == ZoneStatus::Started { + if status.state() == ZoneState::Created { break; } } diff --git a/crates/ctl/src/cli/zone/list.rs b/crates/ctl/src/cli/zone/list.rs index eef38c5..4129603 100644 --- a/crates/ctl/src/cli/zone/list.rs +++ b/crates/ctl/src/cli/zone/list.rs @@ -4,18 +4,19 @@ use comfy_table::{presets::UTF8_FULL_CONDENSED, Cell, Color, Table}; use krata::{ events::EventStream, v1::{ - common::{Zone, ZoneStatus}, + common::Zone, control::{ - control_service_client::ControlServiceClient, ListZonesRequest, ResolveZoneRequest, + control_service_client::ControlServiceClient, ListZonesRequest, ResolveZoneIdRequest, }, }, }; +use crate::format::{kv2line, proto2dynamic, proto2kv, zone_simple_line, zone_state_text}; +use krata::v1::common::ZoneState; +use krata::v1::control::GetZoneRequest; use serde_json::Value; use tonic::{transport::Channel, Request}; -use crate::format::{kv2line, proto2dynamic, proto2kv, zone_simple_line, zone_status_text}; - #[derive(ValueEnum, Clone, Debug, PartialEq, Eq)] enum ZoneListFormat { Table, @@ -44,11 +45,21 @@ impl ZoneListCommand { ) -> Result<()> { let mut zones = if let Some(ref zone) = self.zone { let reply = client - .resolve_zone(Request::new(ResolveZoneRequest { name: zone.clone() })) + .resolve_zone_id(Request::new(ResolveZoneIdRequest { name: zone.clone() })) .await? .into_inner(); - if let Some(zone) = reply.zone { - vec![zone] + if !reply.zone_id.is_empty() { + let reply = client + .get_zone(Request::new(GetZoneRequest { + zone_id: reply.zone_id, + })) + .await? + .into_inner(); + if let Some(zone) = reply.zone { + vec![zone] + } else { + return Err(anyhow!("unable to resolve zone '{}'", zone)); + } } else { return Err(anyhow!("unable to resolve zone '{}'", zone)); } @@ -115,30 +126,30 @@ impl ZoneListCommand { let mut table = Table::new(); table.load_preset(UTF8_FULL_CONDENSED); table.set_content_arrangement(comfy_table::ContentArrangement::Dynamic); - table.set_header(vec!["name", "uuid", "status", "ipv4", "ipv6"]); + table.set_header(vec!["name", "uuid", "state", "ipv4", "ipv6"]); for zone in zones { let ipv4 = zone - .state + .status .as_ref() - .and_then(|x| x.network.as_ref()) + .and_then(|x| x.network_status.as_ref()) .map(|x| x.zone_ipv4.as_str()) .unwrap_or("n/a"); let ipv6 = zone - .state + .status .as_ref() - .and_then(|x| x.network.as_ref()) + .and_then(|x| x.network_status.as_ref()) .map(|x| x.zone_ipv6.as_str()) .unwrap_or("n/a"); let Some(spec) = zone.spec else { continue; }; - let status = zone.state.as_ref().cloned().unwrap_or_default().status(); - let status_text = zone_status_text(status); + let state = zone.status.as_ref().cloned().unwrap_or_default().state(); + let status_text = zone_state_text(state); - let status_color = match status { - ZoneStatus::Destroyed | ZoneStatus::Failed => Color::Red, - ZoneStatus::Destroying | ZoneStatus::Exited | ZoneStatus::Starting => Color::Yellow, - ZoneStatus::Started => Color::Green, + let status_color = match state { + ZoneState::Destroyed | ZoneState::Failed => Color::Red, + ZoneState::Destroying | ZoneState::Exited | ZoneState::Creating => Color::Yellow, + ZoneState::Created => Color::Green, _ => Color::Reset, }; diff --git a/crates/ctl/src/cli/zone/resolve.rs b/crates/ctl/src/cli/zone/resolve.rs index 34251d6..1e0381d 100644 --- a/crates/ctl/src/cli/zone/resolve.rs +++ b/crates/ctl/src/cli/zone/resolve.rs @@ -1,6 +1,6 @@ use anyhow::Result; use clap::Parser; -use krata::v1::control::{control_service_client::ControlServiceClient, ResolveZoneRequest}; +use krata::v1::control::{control_service_client::ControlServiceClient, ResolveZoneIdRequest}; use tonic::{transport::Channel, Request}; @@ -14,13 +14,13 @@ pub struct ZoneResolveCommand { impl ZoneResolveCommand { pub async fn run(self, mut client: ControlServiceClient) -> Result<()> { let reply = client - .resolve_zone(Request::new(ResolveZoneRequest { + .resolve_zone_id(Request::new(ResolveZoneIdRequest { name: self.zone.clone(), })) .await? .into_inner(); - if let Some(zone) = reply.zone { - println!("{}", zone.id); + if !reply.zone_id.is_empty() { + println!("{}", reply.zone_id); } else { std::process::exit(1); } diff --git a/crates/ctl/src/cli/zone/top.rs b/crates/ctl/src/cli/zone/top.rs index 47a7eb4..04c2441 100644 --- a/crates/ctl/src/cli/zone/top.rs +++ b/crates/ctl/src/cli/zone/top.rs @@ -24,7 +24,7 @@ use ratatui::{ }; use crate::{ - format::zone_status_text, + format::zone_state_text, metrics::{ lookup_metric_value, MultiMetricCollector, MultiMetricCollectorHandle, MultiMetricState, }, @@ -157,7 +157,7 @@ impl Widget for &mut ZoneTopApp { continue; }; - let Some(ref state) = ms.zone.state else { + let Some(ref status) = ms.zone.status else { continue; }; @@ -177,7 +177,7 @@ impl Widget for &mut ZoneTopApp { let row = Row::new(vec![ spec.name.clone(), ms.zone.id.clone(), - zone_status_text(state.status()), + zone_state_text(status.state()), memory_total.unwrap_or_default(), memory_used.unwrap_or_default(), memory_free.unwrap_or_default(), diff --git a/crates/ctl/src/console.rs b/crates/ctl/src/console.rs index 96282e0..b05b0f6 100644 --- a/crates/ctl/src/console.rs +++ b/crates/ctl/src/console.rs @@ -4,14 +4,12 @@ use crossterm::{ terminal::{disable_raw_mode, enable_raw_mode, is_raw_mode_enabled}, tty::IsTty, }; +use krata::v1::common::ZoneState; use krata::{ events::EventStream, - v1::{ - common::ZoneStatus, - control::{ - watch_events_reply::Event, ExecZoneReply, ExecZoneRequest, ZoneConsoleReply, - ZoneConsoleRequest, - }, + v1::control::{ + watch_events_reply::Event, ExecInsideZoneReply, ExecInsideZoneRequest, ZoneConsoleReply, + ZoneConsoleRequest, }, }; use log::debug; @@ -49,8 +47,8 @@ impl StdioConsoleStream { } pub async fn stdin_stream_exec( - initial: ExecZoneRequest, - ) -> impl Stream { + initial: ExecInsideZoneRequest, + ) -> impl Stream { let mut stdin = stdin(); stream! { yield initial; @@ -68,7 +66,7 @@ impl StdioConsoleStream { if size == 1 && buffer[0] == 0x1d { break; } - yield ExecZoneRequest { zone_id: String::default(), task: None, data }; + yield ExecInsideZoneRequest { zone_id: String::default(), task: None, data }; } } } @@ -90,7 +88,7 @@ impl StdioConsoleStream { Ok(()) } - pub async fn exec_output(mut stream: Streaming) -> Result { + pub async fn exec_output(mut stream: Streaming) -> Result { let mut stdout = stdout(); let mut stderr = stderr(); while let Some(reply) = stream.next().await { @@ -128,7 +126,7 @@ impl StdioConsoleStream { continue; }; - let Some(state) = zone.state else { + let Some(status) = zone.status else { continue; }; @@ -136,12 +134,12 @@ impl StdioConsoleStream { continue; } - if let Some(exit_info) = state.exit_info { - return Some(exit_info.code); + if let Some(exit_status) = status.exit_status { + return Some(exit_status.code); } - let status = state.status(); - if status == ZoneStatus::Destroying || status == ZoneStatus::Destroyed { + let state = status.state(); + if state == ZoneState::Destroying || state == ZoneState::Destroyed { return Some(10); } } diff --git a/crates/ctl/src/format.rs b/crates/ctl/src/format.rs index d95e514..842a634 100644 --- a/crates/ctl/src/format.rs +++ b/crates/ctl/src/format.rs @@ -3,11 +3,12 @@ use std::{collections::HashMap, time::Duration}; use anyhow::Result; use fancy_duration::FancyDuration; use human_bytes::human_bytes; -use krata::v1::common::{Zone, ZoneMetricFormat, ZoneMetricNode, ZoneStatus}; use prost_reflect::{DynamicMessage, ReflectMessage}; use prost_types::Value; use termtree::Tree; +use krata::v1::common::{Zone, ZoneMetricFormat, ZoneMetricNode, ZoneState}; + pub fn proto2dynamic(proto: impl ReflectMessage) -> Result { Ok(DynamicMessage::decode( proto.descriptor(), @@ -75,30 +76,30 @@ pub fn kv2line(map: HashMap) -> String { .join(" ") } -pub fn zone_status_text(status: ZoneStatus) -> String { +pub fn zone_state_text(status: ZoneState) -> String { match status { - ZoneStatus::Starting => "starting", - ZoneStatus::Started => "started", - ZoneStatus::Destroying => "destroying", - ZoneStatus::Destroyed => "destroyed", - ZoneStatus::Exited => "exited", - ZoneStatus::Failed => "failed", + ZoneState::Creating => "creating", + ZoneState::Created => "created", + ZoneState::Destroying => "destroying", + ZoneState::Destroyed => "destroyed", + ZoneState::Exited => "exited", + ZoneState::Failed => "failed", _ => "unknown", } .to_string() } pub fn zone_simple_line(zone: &Zone) -> String { - let state = zone_status_text( - zone.state + let state = zone_state_text( + zone.status .as_ref() - .map(|x| x.status()) - .unwrap_or(ZoneStatus::Unknown), + .map(|x| x.state()) + .unwrap_or(ZoneState::Unknown), ); let name = zone.spec.as_ref().map(|x| x.name.as_str()).unwrap_or(""); - let network = zone.state.as_ref().and_then(|x| x.network.as_ref()); - let ipv4 = network.map(|x| x.zone_ipv4.as_str()).unwrap_or(""); - let ipv6 = network.map(|x| x.zone_ipv6.as_str()).unwrap_or(""); + let network_status = zone.status.as_ref().and_then(|x| x.network_status.as_ref()); + let ipv4 = network_status.map(|x| x.zone_ipv4.as_str()).unwrap_or(""); + let ipv6 = network_status.map(|x| x.zone_ipv6.as_str()).unwrap_or(""); format!("{}\t{}\t{}\t{}\t{}", zone.id, state, name, ipv4, ipv6) } diff --git a/crates/ctl/src/metrics.rs b/crates/ctl/src/metrics.rs index faad956..0a7a76e 100644 --- a/crates/ctl/src/metrics.rs +++ b/crates/ctl/src/metrics.rs @@ -1,8 +1,10 @@ +use crate::format::metrics_value_pretty; use anyhow::Result; +use krata::v1::common::ZoneState; use krata::{ events::EventStream, v1::{ - common::{Zone, ZoneMetricNode, ZoneStatus}, + common::{Zone, ZoneMetricNode}, control::{ control_service_client::ControlServiceClient, watch_events_reply::Event, ListZonesRequest, ReadZoneMetricsRequest, @@ -19,8 +21,6 @@ use tokio::{ }; use tonic::transport::Channel; -use crate::format::metrics_value_pretty; - pub struct MetricState { pub zone: Zone, pub root: Option, @@ -86,11 +86,11 @@ impl MultiMetricCollector { let Some(zone) = changed.zone else { continue; }; - let Some(ref state) = zone.state else { + let Some(ref status) = zone.status else { continue; }; zones.retain(|x| x.id != zone.id); - if state.status() != ZoneStatus::Destroying { + if status.state() != ZoneState::Destroying { zones.push(zone); } false @@ -112,11 +112,11 @@ impl MultiMetricCollector { let mut metrics = Vec::new(); for zone in &zones { - let Some(ref state) = zone.state else { + let Some(ref status) = zone.status else { continue; }; - if state.status() != ZoneStatus::Started { + if status.state() != ZoneState::Created { continue; } diff --git a/crates/daemon/Cargo.toml b/crates/daemon/Cargo.toml index cd72dcd..ce6cbca 100644 --- a/crates/daemon/Cargo.toml +++ b/crates/daemon/Cargo.toml @@ -9,6 +9,7 @@ edition = "2021" resolver = "2" [dependencies] +krata-advmac = { workspace = true } anyhow = { workspace = true } async-stream = { workspace = true } async-trait = { workspace = true } @@ -17,6 +18,7 @@ circular-buffer = { workspace = true } clap = { workspace = true } env_logger = { workspace = true } futures = { workspace = true } +ipnetwork = { workspace = true } krata = { path = "../krata", version = "^0.0.15" } krata-oci = { path = "../oci", version = "^0.0.15" } krata-runtime = { path = "../runtime", version = "^0.0.15" } @@ -25,6 +27,7 @@ prost = { workspace = true } redb = { workspace = true } scopeguard = { workspace = true } serde = { workspace = true } +serde_json = { workspace = true } signal-hook = { workspace = true } tokio = { workspace = true } tokio-stream = { workspace = true } diff --git a/crates/daemon/src/config.rs b/crates/daemon/src/config.rs index 731f198..91f5f1e 100644 --- a/crates/daemon/src/config.rs +++ b/crates/daemon/src/config.rs @@ -10,6 +10,8 @@ pub struct DaemonConfig { pub oci: OciConfig, #[serde(default)] pub pci: DaemonPciConfig, + #[serde(default)] + pub network: DaemonNetworkConfig, } #[derive(Serialize, Deserialize, Clone, Debug, Default)] @@ -49,6 +51,21 @@ pub enum DaemonPciDeviceRdmReservePolicy { Relaxed, } +#[derive(Serialize, Deserialize, Clone, Debug, Default)] +pub struct DaemonNetworkConfig { + #[serde(default = "default_network_nameservers")] + pub nameservers: Vec, +} + +fn default_network_nameservers() -> Vec { + vec![ + "1.1.1.1".to_string(), + "1.0.0.1".to_string(), + "2606:4700:4700::1111".to_string(), + "2606:4700:4700::1001".to_string(), + ] +} + impl DaemonConfig { pub async fn load(path: &Path) -> Result { if path.exists() { diff --git a/crates/daemon/src/control.rs b/crates/daemon/src/control.rs index a6a7452..3fed4e6 100644 --- a/crates/daemon/src/control.rs +++ b/crates/daemon/src/control.rs @@ -1,5 +1,15 @@ +use crate::db::zone::ZoneStore; +use crate::{ + command::DaemonCommand, console::DaemonConsoleHandle, devices::DaemonDeviceManager, + event::DaemonEventContext, idm::DaemonIdmHandle, metrics::idm_metric_to_api, + oci::convert_oci_progress, zlt::ZoneLookupTable, +}; use async_stream::try_stream; use futures::Stream; +use krata::v1::control::{ + GetZoneReply, GetZoneRequest, SetHostPowerManagementPolicyReply, + SetHostPowerManagementPolicyRequest, +}; use krata::{ idm::internal::{ exec_stream_request_update::Update, request::Request as IdmRequestType, @@ -10,11 +20,11 @@ use krata::{ common::{OciImageFormat, Zone, ZoneState, ZoneStatus}, control::{ control_service_server::ControlService, CreateZoneReply, CreateZoneRequest, - DestroyZoneReply, DestroyZoneRequest, DeviceInfo, ExecZoneReply, ExecZoneRequest, - HostCpuTopologyInfo, HostCpuTopologyReply, HostCpuTopologyRequest, - HostPowerManagementPolicy, IdentifyHostReply, IdentifyHostRequest, ListDevicesReply, + DestroyZoneReply, DestroyZoneRequest, DeviceInfo, ExecInsideZoneReply, + ExecInsideZoneRequest, GetHostCpuTopologyReply, GetHostCpuTopologyRequest, + HostCpuTopologyInfo, HostStatusReply, HostStatusRequest, ListDevicesReply, ListDevicesRequest, ListZonesReply, ListZonesRequest, PullImageReply, PullImageRequest, - ReadZoneMetricsReply, ReadZoneMetricsRequest, ResolveZoneReply, ResolveZoneRequest, + ReadZoneMetricsReply, ReadZoneMetricsRequest, ResolveZoneIdReply, ResolveZoneIdRequest, SnoopIdmReply, SnoopIdmRequest, WatchEventsReply, WatchEventsRequest, ZoneConsoleReply, ZoneConsoleRequest, }, @@ -36,12 +46,6 @@ use tokio_stream::StreamExt; use tonic::{Request, Response, Status, Streaming}; use uuid::Uuid; -use crate::{ - command::DaemonCommand, console::DaemonConsoleHandle, db::ZoneStore, - devices::DaemonDeviceManager, event::DaemonEventContext, idm::DaemonIdmHandle, - metrics::idm_metric_to_api, oci::convert_oci_progress, zlt::ZoneLookupTable, -}; - pub struct ApiError { message: String, } @@ -112,8 +116,8 @@ enum PullImageSelect { #[tonic::async_trait] impl ControlService for DaemonControlService { - type ExecZoneStream = - Pin> + Send + 'static>>; + type ExecInsideZoneStream = + Pin> + Send + 'static>>; type AttachZoneConsoleStream = Pin> + Send + 'static>>; @@ -127,12 +131,12 @@ impl ControlService for DaemonControlService { type SnoopIdmStream = Pin> + Send + 'static>>; - async fn identify_host( + async fn host_status( &self, - request: Request, - ) -> Result, Status> { + request: Request, + ) -> Result, Status> { let _ = request.into_inner(); - Ok(Response::new(IdentifyHostReply { + Ok(Response::new(HostStatusReply { host_domid: self.glt.host_domid(), host_uuid: self.glt.host_uuid().to_string(), krata_version: DaemonCommand::version(), @@ -156,11 +160,11 @@ impl ControlService for DaemonControlService { uuid, Zone { id: uuid.to_string(), - state: Some(ZoneState { - status: ZoneStatus::Starting.into(), - network: None, - exit_info: None, - error_info: None, + status: Some(ZoneStatus { + state: ZoneState::Creating.into(), + network_status: None, + exit_status: None, + error_status: None, host: self.glt.host_uuid().to_string(), domid: u32::MAX, }), @@ -180,10 +184,10 @@ impl ControlService for DaemonControlService { })) } - async fn exec_zone( + async fn exec_inside_zone( &self, - request: Request>, - ) -> Result, Status> { + request: Request>, + ) -> Result, Status> { let mut input = request.into_inner(); let Some(request) = input.next().await else { return Err(ApiError { @@ -232,7 +236,7 @@ impl ControlService for DaemonControlService { loop { select! { x = input.next() => if let Some(update) = x { - let update: Result = update.map_err(|error| ApiError { + let update: Result = update.map_err(|error| ApiError { message: error.to_string() }.into()); @@ -252,7 +256,7 @@ impl ControlService for DaemonControlService { let Some(IdmResponseType::ExecStream(update)) = response.response else { break; }; - let reply = ExecZoneReply { + let reply = ExecInsideZoneReply { exited: update.exited, error: update.error, exit_code: update.exit_code, @@ -269,7 +273,7 @@ impl ControlService for DaemonControlService { } }; - Ok(Response::new(Box::pin(output) as Self::ExecZoneStream)) + Ok(Response::new(Box::pin(output) as Self::ExecInsideZoneStream)) } async fn destroy_zone( @@ -287,16 +291,16 @@ impl ControlService for DaemonControlService { .into()); }; - zone.state = Some(zone.state.as_mut().cloned().unwrap_or_default()); + zone.status = Some(zone.status.as_mut().cloned().unwrap_or_default()); - if zone.state.as_ref().unwrap().status() == ZoneStatus::Destroyed { + if zone.status.as_ref().unwrap().state() == ZoneState::Destroyed { return Err(ApiError { message: "zone already destroyed".to_string(), } .into()); } - zone.state.as_mut().unwrap().status = ZoneStatus::Destroying.into(); + zone.status.as_mut().unwrap().state = ZoneState::Destroying.into(); self.zones .update(uuid, zone) .await @@ -320,10 +324,10 @@ impl ControlService for DaemonControlService { Ok(Response::new(ListZonesReply { zones })) } - async fn resolve_zone( + async fn resolve_zone_id( &self, - request: Request, - ) -> Result, Status> { + request: Request, + ) -> Result, Status> { let request = request.into_inner(); let zones = self.zones.list().await.map_err(ApiError::from)?; let zones = zones @@ -334,8 +338,8 @@ impl ControlService for DaemonControlService { || x.id == request.name }) .collect::>(); - Ok(Response::new(ResolveZoneReply { - zone: zones.first().cloned(), + Ok(Response::new(ResolveZoneIdReply { + zone_id: zones.first().cloned().map(|x| x.id).unwrap_or_default(), })) } @@ -558,8 +562,8 @@ impl ControlService for DaemonControlService { async fn get_host_cpu_topology( &self, - request: Request, - ) -> Result, Status> { + request: Request, + ) -> Result, Status> { let _ = request.into_inner(); let power = self .runtime @@ -579,13 +583,13 @@ impl ControlService for DaemonControlService { }) } - Ok(Response::new(HostCpuTopologyReply { cpus })) + Ok(Response::new(GetHostCpuTopologyReply { cpus })) } async fn set_host_power_management_policy( &self, - request: Request, - ) -> Result, Status> { + request: Request, + ) -> Result, Status> { let policy = request.into_inner(); let power = self .runtime @@ -603,9 +607,20 @@ impl ControlService for DaemonControlService { .await .map_err(ApiError::from)?; - Ok(Response::new(HostPowerManagementPolicy { - scheduler: scheduler.to_string(), - smt_awareness: policy.smt_awareness, + Ok(Response::new(SetHostPowerManagementPolicyReply {})) + } + + async fn get_zone( + &self, + request: Request, + ) -> Result, Status> { + let request = request.into_inner(); + let zones = self.zones.list().await.map_err(ApiError::from)?; + let zone = zones.get(&Uuid::from_str(&request.zone_id).map_err(|error| ApiError { + message: error.to_string(), + })?); + Ok(Response::new(GetZoneReply { + zone: zone.cloned(), })) } } diff --git a/crates/daemon/src/db/ip.rs b/crates/daemon/src/db/ip.rs new file mode 100644 index 0000000..95c3bec --- /dev/null +++ b/crates/daemon/src/db/ip.rs @@ -0,0 +1,91 @@ +use crate::db::KrataDatabase; +use advmac::MacAddr6; +use anyhow::Result; +use log::error; +use redb::{ReadableTable, TableDefinition}; +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; +use std::net::{Ipv4Addr, Ipv6Addr}; +use uuid::Uuid; + +const IP_RESERVATION_TABLE: TableDefinition = TableDefinition::new("ip-reservation"); + +#[derive(Clone)] +pub struct IpReservationStore { + db: KrataDatabase, +} + +impl IpReservationStore { + pub fn open(db: KrataDatabase) -> Result { + let write = db.database.begin_write()?; + let _ = write.open_table(IP_RESERVATION_TABLE); + write.commit()?; + Ok(IpReservationStore { db }) + } + + pub async fn read(&self, id: Uuid) -> Result> { + let read = self.db.database.begin_read()?; + let table = read.open_table(IP_RESERVATION_TABLE)?; + let Some(entry) = table.get(id.to_u128_le())? else { + return Ok(None); + }; + let bytes = entry.value(); + Ok(Some(serde_json::from_slice(bytes)?)) + } + + pub async fn list(&self) -> Result> { + let mut reservations: HashMap = HashMap::new(); + let read = self.db.database.begin_read()?; + let table = read.open_table(IP_RESERVATION_TABLE)?; + for result in table.iter()? { + let (key, value) = result?; + let uuid = Uuid::from_u128_le(key.value()); + let reservation = match serde_json::from_slice(value.value()) { + Ok(reservation) => reservation, + Err(error) => { + error!( + "found invalid ip reservation in database for uuid {}: {}", + uuid, error + ); + continue; + } + }; + reservations.insert(uuid, reservation); + } + Ok(reservations) + } + + pub async fn update(&self, id: Uuid, entry: IpReservation) -> Result<()> { + let write = self.db.database.begin_write()?; + { + let mut table = write.open_table(IP_RESERVATION_TABLE)?; + let bytes = serde_json::to_vec(&entry)?; + table.insert(id.to_u128_le(), bytes.as_slice())?; + } + write.commit()?; + Ok(()) + } + + pub async fn remove(&self, id: Uuid) -> Result<()> { + let write = self.db.database.begin_write()?; + { + let mut table = write.open_table(IP_RESERVATION_TABLE)?; + table.remove(id.to_u128_le())?; + } + write.commit()?; + Ok(()) + } +} + +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct IpReservation { + pub uuid: String, + pub ipv4: Ipv4Addr, + pub ipv6: Ipv6Addr, + pub mac: MacAddr6, + pub ipv4_prefix: u8, + pub ipv6_prefix: u8, + pub gateway_ipv4: Ipv4Addr, + pub gateway_ipv6: Ipv6Addr, + pub gateway_mac: MacAddr6, +} diff --git a/crates/daemon/src/db/mod.rs b/crates/daemon/src/db/mod.rs new file mode 100644 index 0000000..5d2f70b --- /dev/null +++ b/crates/daemon/src/db/mod.rs @@ -0,0 +1,21 @@ +use anyhow::Result; +use redb::Database; +use std::path::Path; +use std::sync::Arc; + +pub mod ip; +pub mod zone; + +#[derive(Clone)] +pub struct KrataDatabase { + pub database: Arc, +} + +impl KrataDatabase { + pub fn open(path: &Path) -> Result { + let database = Database::create(path)?; + Ok(KrataDatabase { + database: Arc::new(database), + }) + } +} diff --git a/crates/daemon/src/db.rs b/crates/daemon/src/db/zone.rs similarity index 64% rename from crates/daemon/src/db.rs rename to crates/daemon/src/db/zone.rs index df2c78d..e56347e 100644 --- a/crates/daemon/src/db.rs +++ b/crates/daemon/src/db/zone.rs @@ -1,33 +1,31 @@ -use std::{collections::HashMap, path::Path, sync::Arc}; +use std::collections::HashMap; +use crate::db::KrataDatabase; use anyhow::Result; use krata::v1::common::Zone; use log::error; use prost::Message; -use redb::{Database, ReadableTable, TableDefinition}; +use redb::{ReadableTable, TableDefinition}; use uuid::Uuid; -const ZONES: TableDefinition = TableDefinition::new("zones"); +const ZONE_TABLE: TableDefinition = TableDefinition::new("zone"); #[derive(Clone)] pub struct ZoneStore { - database: Arc, + db: KrataDatabase, } impl ZoneStore { - pub fn open(path: &Path) -> Result { - let database = Database::create(path)?; - let write = database.begin_write()?; - let _ = write.open_table(ZONES); + pub fn open(db: KrataDatabase) -> Result { + let write = db.database.begin_write()?; + let _ = write.open_table(ZONE_TABLE); write.commit()?; - Ok(ZoneStore { - database: Arc::new(database), - }) + Ok(ZoneStore { db }) } pub async fn read(&self, id: Uuid) -> Result> { - let read = self.database.begin_read()?; - let table = read.open_table(ZONES)?; + let read = self.db.database.begin_read()?; + let table = read.open_table(ZONE_TABLE)?; let Some(entry) = table.get(id.to_u128_le())? else { return Ok(None); }; @@ -37,8 +35,8 @@ impl ZoneStore { pub async fn list(&self) -> Result> { let mut zones: HashMap = HashMap::new(); - let read = self.database.begin_read()?; - let table = read.open_table(ZONES)?; + let read = self.db.database.begin_read()?; + let table = read.open_table(ZONE_TABLE)?; for result in table.iter()? { let (key, value) = result?; let uuid = Uuid::from_u128_le(key.value()); @@ -58,9 +56,9 @@ impl ZoneStore { } pub async fn update(&self, id: Uuid, entry: Zone) -> Result<()> { - let write = self.database.begin_write()?; + let write = self.db.database.begin_write()?; { - let mut table = write.open_table(ZONES)?; + let mut table = write.open_table(ZONE_TABLE)?; let bytes = entry.encode_to_vec(); table.insert(id.to_u128_le(), bytes.as_slice())?; } @@ -69,9 +67,9 @@ impl ZoneStore { } pub async fn remove(&self, id: Uuid) -> Result<()> { - let write = self.database.begin_write()?; + let write = self.db.database.begin_write()?; { - let mut table = write.open_table(ZONES)?; + let mut table = write.open_table(ZONE_TABLE)?; table.remove(id.to_u128_le())?; } write.commit()?; diff --git a/crates/daemon/src/event.rs b/crates/daemon/src/event.rs index f92c215..8fb965d 100644 --- a/crates/daemon/src/event.rs +++ b/crates/daemon/src/event.rs @@ -4,9 +4,10 @@ use std::{ time::Duration, }; -use crate::{db::ZoneStore, idm::DaemonIdmHandle}; +use crate::db::zone::ZoneStore; +use crate::idm::DaemonIdmHandle; use anyhow::Result; -use krata::v1::common::ZoneExitInfo; +use krata::v1::common::ZoneExitStatus; use krata::{ idm::{internal::event::Event as EventType, internal::Event}, v1::common::{ZoneState, ZoneStatus}, @@ -83,15 +84,15 @@ impl DaemonEventGenerator { return Ok(()); }; - let Some(ref state) = zone.state else { + let Some(ref status) = zone.status else { return Ok(()); }; - let status = state.status(); + let state = status.state(); let id = Uuid::from_str(&zone.id)?; - let domid = state.domid; - match status { - ZoneStatus::Started => { + let domid = status.domid; + match state { + ZoneState::Created => { if let Entry::Vacant(e) = self.idms.entry(domid) { let client = self.idm.client_by_domid(domid).await?; let mut receiver = client.subscribe().await?; @@ -111,7 +112,7 @@ impl DaemonEventGenerator { } } - ZoneStatus::Destroyed => { + ZoneState::Destroyed => { if let Some((_, handle)) = self.idms.remove(&domid) { handle.abort(); } @@ -131,13 +132,13 @@ impl DaemonEventGenerator { async fn handle_exit_code(&mut self, id: Uuid, code: i32) -> Result<()> { if let Some(mut zone) = self.zones.read(id).await? { - zone.state = Some(ZoneState { - status: ZoneStatus::Exited.into(), - network: zone.state.clone().unwrap_or_default().network, - exit_info: Some(ZoneExitInfo { code }), - error_info: None, - host: zone.state.clone().map(|x| x.host).unwrap_or_default(), - domid: zone.state.clone().map(|x| x.domid).unwrap_or(u32::MAX), + zone.status = Some(ZoneStatus { + state: ZoneState::Exited.into(), + network_status: zone.status.clone().unwrap_or_default().network_status, + exit_status: Some(ZoneExitStatus { code }), + error_status: None, + host: zone.status.clone().map(|x| x.host).unwrap_or_default(), + domid: zone.status.clone().map(|x| x.domid).unwrap_or(u32::MAX), }); self.zones.update(id, zone).await?; diff --git a/crates/daemon/src/ip/assignment.rs b/crates/daemon/src/ip/assignment.rs new file mode 100644 index 0000000..b40d586 --- /dev/null +++ b/crates/daemon/src/ip/assignment.rs @@ -0,0 +1,197 @@ +use advmac::MacAddr6; +use anyhow::{anyhow, Result}; +use ipnetwork::{Ipv4Network, Ipv6Network}; +use std::{ + collections::HashMap, + net::{Ipv4Addr, Ipv6Addr}, + sync::Arc, +}; +use tokio::sync::RwLock; +use uuid::Uuid; + +use crate::db::ip::{IpReservation, IpReservationStore}; + +#[derive(Default, Clone)] +pub struct IpAssignmentState { + pub ipv4: HashMap, + pub ipv6: HashMap, +} + +#[derive(Clone)] +pub struct IpAssignment { + ipv4_network: Ipv4Network, + ipv6_network: Ipv6Network, + gateway_ipv4: Ipv4Addr, + gateway_ipv6: Ipv6Addr, + gateway_mac: MacAddr6, + store: IpReservationStore, + state: Arc>, +} + +impl IpAssignment { + pub async fn new( + host_uuid: Uuid, + ipv4_network: Ipv4Network, + ipv6_network: Ipv6Network, + store: IpReservationStore, + ) -> Result { + let mut state = IpAssignment::fetch_current_state(&store).await?; + let reservation = if let Some(reservation) = store.read(host_uuid).await? { + reservation + } else { + IpAssignment::allocate( + &mut state, + &store, + host_uuid, + ipv4_network, + ipv6_network, + None, + None, + None, + ) + .await? + }; + let assignment = IpAssignment { + ipv4_network, + ipv6_network, + gateway_ipv4: reservation.ipv4, + gateway_ipv6: reservation.ipv6, + gateway_mac: reservation.gateway_mac, + store, + state: Arc::new(RwLock::new(state)), + }; + Ok(assignment) + } + + async fn fetch_current_state(store: &IpReservationStore) -> Result { + let reservations = store.list().await?; + let mut state = IpAssignmentState::default(); + for reservation in reservations.values() { + state.ipv4.insert(reservation.ipv4, reservation.clone()); + state.ipv6.insert(reservation.ipv6, reservation.clone()); + } + Ok(state) + } + + #[allow(clippy::too_many_arguments)] + async fn allocate( + state: &mut IpAssignmentState, + store: &IpReservationStore, + uuid: Uuid, + ipv4_network: Ipv4Network, + ipv6_network: Ipv6Network, + gateway_ipv4: Option, + gateway_ipv6: Option, + gateway_mac: Option, + ) -> Result { + let mut found_ipv4: Option = None; + for ip in ipv4_network.iter() { + if ip.is_loopback() || ip.is_multicast() || ip.is_broadcast() { + continue; + } + + if !ip.is_private() { + continue; + } + + let last = ip.octets()[3]; + if last == 0 || last > 250 { + continue; + } + + if state.ipv4.contains_key(&ip) { + continue; + } + found_ipv4 = Some(ip); + break; + } + + let mut found_ipv6: Option = None; + for ip in ipv6_network.iter() { + if ip.is_loopback() || ip.is_multicast() { + continue; + } + + if state.ipv6.contains_key(&ip) { + continue; + } + found_ipv6 = Some(ip); + break; + } + + let Some(ipv4) = found_ipv4 else { + return Err(anyhow!( + "unable to allocate ipv4 address, assigned network is exhausted" + )); + }; + + let Some(ipv6) = found_ipv6 else { + return Err(anyhow!( + "unable to allocate ipv6 address, assigned network is exhausted" + )); + }; + + let mut mac = MacAddr6::random(); + mac.set_local(false); + mac.set_multicast(false); + + let reservation = IpReservation { + uuid: uuid.to_string(), + ipv4, + ipv6, + mac, + ipv4_prefix: ipv4_network.prefix(), + ipv6_prefix: ipv6_network.prefix(), + gateway_ipv4: gateway_ipv4.unwrap_or(ipv4), + gateway_ipv6: gateway_ipv6.unwrap_or(ipv6), + gateway_mac: gateway_mac.unwrap_or(mac), + }; + state.ipv4.insert(ipv4, reservation.clone()); + state.ipv6.insert(ipv6, reservation.clone()); + store.update(uuid, reservation.clone()).await?; + Ok(reservation) + } + + pub async fn assign(&self, uuid: Uuid) -> Result { + let mut state = self.state.write().await; + let reservation = IpAssignment::allocate( + &mut state, + &self.store, + uuid, + self.ipv4_network, + self.ipv6_network, + Some(self.gateway_ipv4), + Some(self.gateway_ipv6), + Some(self.gateway_mac), + ) + .await?; + Ok(reservation) + } + + pub async fn recall(&self, uuid: Uuid) -> Result<()> { + let mut state = self.state.write().await; + self.store.remove(uuid).await?; + state + .ipv4 + .retain(|_, reservation| reservation.uuid != uuid.to_string()); + state + .ipv6 + .retain(|_, reservation| reservation.uuid != uuid.to_string()); + Ok(()) + } + + pub async fn retrieve(&self, uuid: Uuid) -> Result> { + self.store.read(uuid).await + } + + pub async fn reload(&self) -> Result<()> { + let mut state = self.state.write().await; + let intermediate = IpAssignment::fetch_current_state(&self.store).await?; + *state = intermediate; + Ok(()) + } + + pub async fn read(&self) -> Result { + Ok(self.state.read().await.clone()) + } +} diff --git a/crates/daemon/src/ip/mod.rs b/crates/daemon/src/ip/mod.rs new file mode 100644 index 0000000..53a13b4 --- /dev/null +++ b/crates/daemon/src/ip/mod.rs @@ -0,0 +1 @@ +pub mod assignment; diff --git a/crates/daemon/src/lib.rs b/crates/daemon/src/lib.rs index 9da5b6a..7fd6f1e 100644 --- a/crates/daemon/src/lib.rs +++ b/crates/daemon/src/lib.rs @@ -1,24 +1,30 @@ -use std::{net::SocketAddr, path::PathBuf, str::FromStr, sync::Arc}; - +use crate::db::ip::IpReservationStore; +use crate::db::zone::ZoneStore; +use crate::db::KrataDatabase; +use crate::ip::assignment::IpAssignment; use anyhow::{anyhow, Result}; use config::DaemonConfig; use console::{DaemonConsole, DaemonConsoleHandle}; use control::DaemonControlService; -use db::ZoneStore; use devices::DaemonDeviceManager; use event::{DaemonEventContext, DaemonEventGenerator}; use idm::{DaemonIdm, DaemonIdmHandle}; +use ipnetwork::{Ipv4Network, Ipv6Network}; use krata::{dial::ControlDialAddress, v1::control::control_service_server::ControlServiceServer}; use krataoci::{packer::service::OciPackerService, registry::OciPlatform}; use kratart::Runtime; use log::{debug, info}; use reconcile::zone::ZoneReconciler; +use std::net::Ipv4Addr; +use std::path::Path; +use std::{net::SocketAddr, path::PathBuf, str::FromStr, sync::Arc}; use tokio::{ fs, net::UnixListener, sync::mpsc::{channel, Sender}, task::JoinHandle, }; +use tokio::runtime::Runtime; use tokio_stream::wrappers::UnixListenerStream; use tonic::transport::{Identity, Server, ServerTlsConfig}; use uuid::Uuid; @@ -32,6 +38,7 @@ pub mod db; pub mod devices; pub mod event; pub mod idm; +pub mod ip; pub mod metrics; pub mod oci; pub mod reconcile; @@ -116,6 +123,15 @@ impl Daemon { debug!("initializing console interfaces"); let console = DaemonConsole::new(glt.clone()).await?; + let zlt = ZoneLookupTable::new(0, host_uuid); + let db_path = format!("{}/zones.db", store); + let database = KrataDatabase::open(Path::new(&db_path))?; + let zones = ZoneStore::open(database.clone())?; + let (zone_reconciler_notify, zone_reconciler_receiver) = + channel::(ZONE_RECONCILER_QUEUE_LEN); + let idm = DaemonIdm::new(zlt.clone()).await?; + let idm = idm.launch().await?; + let console = DaemonConsole::new(zlt.clone()).await?; let console = console.launch().await?; debug!("initializing zone reconciler"); @@ -123,9 +139,16 @@ impl Daemon { DaemonEventGenerator::new(zones.clone(), zone_reconciler_notify.clone(), idm.clone()) .await?; let runtime_for_reconciler = runtime.dupe().await?; + + let ipv4_network = Ipv4Network::new(Ipv4Addr::new(10, 75, 80, 0), 24)?; + let ipv6_network = Ipv6Network::from_str("fdd4:1476:6c7e::/48")?; + let ip_reservation_store = IpReservationStore::open(database)?; + let ip_assignment = + IpAssignment::new(host_uuid, ipv4_network, ipv6_network, ip_reservation_store).await?; + let zone_reconciler = ZoneReconciler::new( devices.clone(), - glt.clone(), + zlt.clone(), zones.clone(), events.clone(), runtime_for_reconciler, @@ -134,6 +157,7 @@ impl Daemon { kernel_path, initrd_path, addons_path, + ip_assignment, )?; let zone_reconciler_task = zone_reconciler.launch(zone_reconciler_receiver).await?; @@ -152,7 +176,7 @@ impl Daemon { Ok(Self { store, _config: config, - glt, + glt: zlt, devices, zones, events, diff --git a/crates/daemon/src/reconcile/zone/start.rs b/crates/daemon/src/reconcile/zone/create.rs similarity index 82% rename from crates/daemon/src/reconcile/zone/start.rs rename to crates/daemon/src/reconcile/zone/create.rs index e1bdcf2..ff3e557 100644 --- a/crates/daemon/src/reconcile/zone/start.rs +++ b/crates/daemon/src/reconcile/zone/create.rs @@ -1,41 +1,40 @@ -use std::collections::HashMap; -use std::path::{Path, PathBuf}; -use std::str::FromStr; -use std::sync::atomic::{AtomicBool, Ordering}; - use anyhow::{anyhow, Result}; use futures::StreamExt; use krata::launchcfg::LaunchPackedFormat; use krata::v1::common::ZoneOciImageSpec; use krata::v1::common::{OciImageFormat, Zone, ZoneState, ZoneStatus}; use krataoci::packer::{service::OciPackerService, OciPackedFormat}; -use kratart::launch::{PciBdf, PciDevice, PciRdmReservePolicy}; +use kratart::launch::{PciBdf, PciDevice, PciRdmReservePolicy, ZoneLaunchNetwork}; use kratart::{launch::ZoneLaunchRequest, Runtime}; use log::info; +use std::collections::HashMap; +use std::path::{Path, PathBuf}; +use std::str::FromStr; +use std::sync::atomic::{AtomicBool, Ordering}; use crate::config::DaemonPciDeviceRdmReservePolicy; use crate::devices::DaemonDeviceManager; -use crate::{ - reconcile::zone::{zoneinfo_to_networkstate, ZoneReconcilerResult}, - zlt::ZoneLookupTable, -}; +use crate::ip::assignment::IpAssignment; +use crate::reconcile::zone::ip_reservation_to_network_status; +use crate::{reconcile::zone::ZoneReconcilerResult, zlt::ZoneLookupTable}; use krata::v1::common::zone_image_spec::Image; use tokio::fs::{self, File}; use tokio::io::AsyncReadExt; use tokio_tar::Archive; use uuid::Uuid; -pub struct ZoneStarter<'a> { +pub struct ZoneCreator<'a> { pub devices: &'a DaemonDeviceManager, pub kernel_path: &'a Path, pub initrd_path: &'a Path, pub addons_path: &'a Path, pub packer: &'a OciPackerService, - pub glt: &'a ZoneLookupTable, + pub ip_assignment: &'a IpAssignment, + pub zlt: &'a ZoneLookupTable, pub runtime: &'a Runtime, } -impl ZoneStarter<'_> { +impl ZoneCreator<'_> { pub async fn oci_spec_tar_read_file( &self, file: &Path, @@ -75,7 +74,7 @@ impl ZoneStarter<'_> { )) } - pub async fn start(&self, uuid: Uuid, zone: &mut Zone) -> Result { + pub async fn create(&self, uuid: Uuid, zone: &mut Zone) -> Result { let Some(ref spec) = zone.spec else { return Err(anyhow!("zone spec not specified")); }; @@ -174,6 +173,8 @@ impl ZoneStarter<'_> { } } + let reservation = self.ip_assignment.assign(uuid).await?; + let info = self .runtime .launch(ZoneLaunchRequest { @@ -187,7 +188,7 @@ impl ZoneStarter<'_> { image, kernel, initrd, - vcpus: spec.vcpus, + vcpus: spec.cpus, mem: spec.mem, pcis, env: task @@ -198,16 +199,25 @@ impl ZoneStarter<'_> { run: empty_vec_optional(task.command.clone()), debug: false, addons_image: Some(self.addons_path.to_path_buf()), + network: ZoneLaunchNetwork { + ipv4: reservation.ipv4.to_string(), + ipv4_prefix: reservation.ipv4_prefix, + ipv6: reservation.ipv6.to_string(), + ipv6_prefix: reservation.ipv6_prefix, + gateway_ipv4: reservation.gateway_ipv4.to_string(), + gateway_ipv6: reservation.gateway_ipv6.to_string(), + zone_mac: reservation.mac, + }, }) .await?; - self.glt.associate(uuid, info.domid).await; - info!("started zone {}", uuid); - zone.state = Some(ZoneState { - status: ZoneStatus::Started.into(), - network: Some(zoneinfo_to_networkstate(&info)), - exit_info: None, - error_info: None, - host: self.glt.host_uuid().to_string(), + self.zlt.associate(uuid, info.domid).await; + info!("created zone {}", uuid); + zone.status = Some(ZoneStatus { + state: ZoneState::Created.into(), + network_status: Some(ip_reservation_to_network_status(&reservation)), + exit_status: None, + error_status: None, + host: self.zlt.host_uuid().to_string(), domid: info.domid, }); success.store(true, Ordering::Release); diff --git a/crates/daemon/src/reconcile/zone/mod.rs b/crates/daemon/src/reconcile/zone/mod.rs index 89c38b1..b8aaa7b 100644 --- a/crates/daemon/src/reconcile/zone/mod.rs +++ b/crates/daemon/src/reconcile/zone/mod.rs @@ -5,13 +5,22 @@ use std::{ time::Duration, }; +use self::create::ZoneCreator; +use crate::db::ip::IpReservation; +use crate::ip::assignment::IpAssignment; +use crate::{ + db::zone::ZoneStore, + devices::DaemonDeviceManager, + event::{DaemonEvent, DaemonEventContext}, + zlt::ZoneLookupTable, +}; use anyhow::Result; use krata::v1::{ - common::{Zone, ZoneErrorInfo, ZoneExitInfo, ZoneNetworkState, ZoneState, ZoneStatus}, + common::{Zone, ZoneErrorStatus, ZoneExitStatus, ZoneNetworkStatus, ZoneState, ZoneStatus}, control::ZoneChangedEvent, }; use krataoci::packer::service::OciPackerService; -use kratart::{Runtime, ZoneInfo}; +use kratart::Runtime; use log::{error, info, trace, warn}; use tokio::{ select, @@ -24,16 +33,7 @@ use tokio::{ }; use uuid::Uuid; -use crate::{ - db::ZoneStore, - devices::DaemonDeviceManager, - event::{DaemonEvent, DaemonEventContext}, - zlt::ZoneLookupTable, -}; - -use self::start::ZoneStarter; - -mod start; +mod create; const PARALLEL_LIMIT: u32 = 5; @@ -68,6 +68,7 @@ pub struct ZoneReconciler { tasks: Arc>>, zone_reconciler_notify: Sender, zone_reconcile_lock: Arc>, + ip_assignment: IpAssignment, } impl ZoneReconciler { @@ -83,6 +84,7 @@ impl ZoneReconciler { kernel_path: PathBuf, initrd_path: PathBuf, modules_path: PathBuf, + ip_assignment: IpAssignment, ) -> Result { Ok(Self { devices, @@ -97,6 +99,7 @@ impl ZoneReconciler { tasks: Arc::new(Mutex::new(HashMap::new())), zone_reconciler_notify, zone_reconcile_lock: Arc::new(RwLock::with_max_readers((), PARALLEL_LIMIT)), + ip_assignment, }) } @@ -166,21 +169,21 @@ impl ZoneReconciler { let runtime_zone = runtime_zones.iter().find(|x| x.uuid == uuid); match runtime_zone { None => { - let mut state = stored_zone.state.as_mut().cloned().unwrap_or_default(); - if state.status() == ZoneStatus::Started { - state.status = ZoneStatus::Starting.into(); + let mut status = stored_zone.status.as_mut().cloned().unwrap_or_default(); + if status.state() == ZoneState::Created { + status.state = ZoneState::Creating.into(); } - stored_zone.state = Some(state); + stored_zone.status = Some(status); } Some(runtime) => { self.zlt.associate(uuid, runtime.domid).await; - let mut state = stored_zone.state.as_mut().cloned().unwrap_or_default(); + let mut status = stored_zone.status.as_mut().cloned().unwrap_or_default(); if let Some(code) = runtime.state.exit_code { - state.status = ZoneStatus::Exited.into(); - state.exit_info = Some(ZoneExitInfo { code }); + status.state = ZoneState::Exited.into(); + status.exit_status = Some(ZoneExitStatus { code }); } else { - state.status = ZoneStatus::Started.into(); + status.state = ZoneState::Created.into(); } for device in &stored_zone @@ -193,8 +196,11 @@ impl ZoneReconciler { device_claims.insert(device.name.clone(), uuid); } - state.network = Some(zoneinfo_to_networkstate(runtime)); - stored_zone.state = Some(state); + if let Some(reservation) = self.ip_assignment.retrieve(uuid).await? { + status.network_status = + Some(ip_reservation_to_network_status(&reservation)); + } + stored_zone.status = Some(status); } } @@ -228,20 +234,20 @@ impl ZoneReconciler { zone: Some(zone.clone()), }))?; - let start_status = zone.state.as_ref().map(|x| x.status()).unwrap_or_default(); - let result = match start_status { - ZoneStatus::Starting => self.start(uuid, &mut zone).await, - ZoneStatus::Exited => self.exited(&mut zone).await, - ZoneStatus::Destroying => self.destroy(uuid, &mut zone).await, + let start_state = zone.status.as_ref().map(|x| x.state()).unwrap_or_default(); + let result = match start_state { + ZoneState::Creating => self.create(uuid, &mut zone).await, + ZoneState::Exited => self.exited(&mut zone).await, + ZoneState::Destroying => self.destroy(uuid, &mut zone).await, _ => Ok(ZoneReconcilerResult::Unchanged), }; let result = match result { Ok(result) => result, Err(error) => { - zone.state = Some(zone.state.as_mut().cloned().unwrap_or_default()); - zone.state.as_mut().unwrap().status = ZoneStatus::Failed.into(); - zone.state.as_mut().unwrap().error_info = Some(ZoneErrorInfo { + zone.status = Some(zone.status.as_mut().cloned().unwrap_or_default()); + zone.status.as_mut().unwrap().state = ZoneState::Failed.into(); + zone.status.as_mut().unwrap().error_status = Some(ZoneErrorStatus { message: error.to_string(), }); warn!("failed to start zone {}: {}", zone.id, error); @@ -251,8 +257,8 @@ impl ZoneReconciler { info!("reconciled zone {}", uuid); - let status = zone.state.as_ref().map(|x| x.status()).unwrap_or_default(); - let destroyed = status == ZoneStatus::Destroyed; + let state = zone.status.as_ref().map(|x| x.state()).unwrap_or_default(); + let destroyed = state == ZoneState::Destroyed; let rerun = if let ZoneReconcilerResult::Changed { rerun } = result { let event = DaemonEvent::ZoneChanged(ZoneChangedEvent { @@ -276,22 +282,23 @@ impl ZoneReconciler { Ok(rerun) } - async fn start(&self, uuid: Uuid, zone: &mut Zone) -> Result { - let starter = ZoneStarter { + async fn create(&self, uuid: Uuid, zone: &mut Zone) -> Result { + let starter = ZoneCreator { devices: &self.devices, kernel_path: &self.kernel_path, initrd_path: &self.initrd_path, addons_path: &self.addons_path, packer: &self.packer, - glt: &self.zlt, + ip_assignment: &self.ip_assignment, + zlt: &self.zlt, runtime: &self.runtime, }; - starter.start(uuid, zone).await + starter.create(uuid, zone).await } async fn exited(&self, zone: &mut Zone) -> Result { - if let Some(ref mut state) = zone.state { - state.set_status(ZoneStatus::Destroying); + if let Some(ref mut status) = zone.status { + status.set_state(ZoneState::Destroying); Ok(ZoneReconcilerResult::Changed { rerun: true }) } else { Ok(ZoneReconcilerResult::Unchanged) @@ -303,18 +310,19 @@ impl ZoneReconciler { trace!("failed to destroy runtime zone {}: {}", uuid, error); } - let domid = zone.state.as_ref().map(|x| x.domid); + let domid = zone.status.as_ref().map(|x| x.domid); if let Some(domid) = domid { self.zlt.remove(uuid, domid).await; } info!("destroyed zone {}", uuid); - zone.state = Some(ZoneState { - status: ZoneStatus::Destroyed.into(), - network: None, - exit_info: None, - error_info: None, + self.ip_assignment.recall(uuid).await?; + zone.status = Some(ZoneStatus { + state: ZoneState::Destroyed.into(), + network_status: None, + exit_status: None, + error_status: None, host: self.zlt.host_uuid().to_string(), domid: domid.unwrap_or(u32::MAX), }); @@ -362,13 +370,13 @@ impl ZoneReconciler { } } -pub fn zoneinfo_to_networkstate(info: &ZoneInfo) -> ZoneNetworkState { - ZoneNetworkState { - zone_ipv4: info.zone_ipv4.map(|x| x.to_string()).unwrap_or_default(), - zone_ipv6: info.zone_ipv6.map(|x| x.to_string()).unwrap_or_default(), - zone_mac: info.zone_mac.as_ref().cloned().unwrap_or_default(), - gateway_ipv4: info.gateway_ipv4.map(|x| x.to_string()).unwrap_or_default(), - gateway_ipv6: info.gateway_ipv6.map(|x| x.to_string()).unwrap_or_default(), - gateway_mac: info.gateway_mac.as_ref().cloned().unwrap_or_default(), +pub fn ip_reservation_to_network_status(ip: &IpReservation) -> ZoneNetworkStatus { + ZoneNetworkStatus { + zone_ipv4: format!("{}/{}", ip.ipv4, ip.ipv4_prefix), + zone_ipv6: format!("{}/{}", ip.ipv6, ip.ipv6_prefix), + zone_mac: ip.mac.to_string().replace('-', ":"), + gateway_ipv4: format!("{}/{}", ip.gateway_ipv4, ip.ipv4_prefix), + gateway_ipv6: format!("{}/{}", ip.gateway_ipv6, ip.ipv6_prefix), + gateway_mac: ip.gateway_mac.to_string().replace('-', ":"), } } diff --git a/crates/krata/proto/krata/v1/common.proto b/crates/krata/proto/krata/v1/common.proto index a8b18d1..e60c9e5 100644 --- a/crates/krata/proto/krata/v1/common.proto +++ b/crates/krata/proto/krata/v1/common.proto @@ -11,7 +11,7 @@ import "google/protobuf/struct.proto"; message Zone { string id = 1; ZoneSpec spec = 2; - ZoneState state = 3; + ZoneStatus status = 3; } message ZoneSpec { @@ -21,7 +21,7 @@ message ZoneSpec { ZoneImageSpec kernel = 3; // If not specified, defaults to the daemon default initrd. ZoneImageSpec initrd = 4; - uint32 vcpus = 5; + uint32 cpus = 5; uint64 mem = 6; ZoneTaskSpec task = 7; repeated ZoneSpecAnnotation annotations = 8; @@ -67,26 +67,26 @@ message ZoneSpecDevice { string name = 1; } -message ZoneState { - ZoneStatus status = 1; - ZoneNetworkState network = 2; - ZoneExitInfo exit_info = 3; - ZoneErrorInfo error_info = 4; +message ZoneStatus { + ZoneState state = 1; + ZoneNetworkStatus network_status = 2; + ZoneExitStatus exit_status = 3; + ZoneErrorStatus error_status = 4; string host = 5; uint32 domid = 6; } -enum ZoneStatus { - ZONE_STATUS_UNKNOWN = 0; - ZONE_STATUS_STARTING = 1; - ZONE_STATUS_STARTED = 2; - ZONE_STATUS_EXITED = 3; - ZONE_STATUS_DESTROYING = 4; - ZONE_STATUS_DESTROYED = 5; - ZONE_STATUS_FAILED = 6; +enum ZoneState { + ZONE_STATE_UNKNOWN = 0; + ZONE_STATE_CREATING = 1; + ZONE_STATE_CREATED = 2; + ZONE_STATE_EXITED = 3; + ZONE_STATE_DESTROYING = 4; + ZONE_STATE_DESTROYED = 5; + ZONE_STATE_FAILED = 6; } -message ZoneNetworkState { +message ZoneNetworkStatus { string zone_ipv4 = 1; string zone_ipv6 = 2; string zone_mac = 3; @@ -95,11 +95,11 @@ message ZoneNetworkState { string gateway_mac = 6; } -message ZoneExitInfo { +message ZoneExitStatus { int32 code = 1; } -message ZoneErrorInfo { +message ZoneErrorStatus { string message = 1; } diff --git a/crates/krata/proto/krata/v1/control.proto b/crates/krata/proto/krata/v1/control.proto index e9f9be1..6f73d90 100644 --- a/crates/krata/proto/krata/v1/control.proto +++ b/crates/krata/proto/krata/v1/control.proto @@ -10,31 +10,34 @@ import "krata/idm/transport.proto"; import "krata/v1/common.proto"; service ControlService { - rpc IdentifyHost(IdentifyHostRequest) returns (IdentifyHostReply); - - rpc CreateZone(CreateZoneRequest) returns (CreateZoneReply); - rpc DestroyZone(DestroyZoneRequest) returns (DestroyZoneReply); - rpc ResolveZone(ResolveZoneRequest) returns (ResolveZoneReply); - rpc ListZones(ListZonesRequest) returns (ListZonesReply); - rpc ListDevices(ListDevicesRequest) returns (ListDevicesReply); - - rpc ExecZone(stream ExecZoneRequest) returns (stream ExecZoneReply); - - rpc AttachZoneConsole(stream ZoneConsoleRequest) returns (stream ZoneConsoleReply); - rpc ReadZoneMetrics(ReadZoneMetricsRequest) returns (ReadZoneMetricsReply); - + rpc HostStatus(HostStatusRequest) returns (HostStatusReply); rpc SnoopIdm(SnoopIdmRequest) returns (stream SnoopIdmReply); - rpc WatchEvents(WatchEventsRequest) returns (stream WatchEventsReply); + rpc GetHostCpuTopology(GetHostCpuTopologyRequest) returns (GetHostCpuTopologyReply); + rpc SetHostPowerManagementPolicy(SetHostPowerManagementPolicyRequest) returns (SetHostPowerManagementPolicyReply); + + rpc ListDevices(ListDevicesRequest) returns (ListDevicesReply); rpc PullImage(PullImageRequest) returns (stream PullImageReply); - rpc GetHostCpuTopology(HostCpuTopologyRequest) returns (HostCpuTopologyReply); - rpc SetHostPowerManagementPolicy(HostPowerManagementPolicy) returns (HostPowerManagementPolicy); + rpc CreateZone(CreateZoneRequest) returns (CreateZoneReply); + rpc DestroyZone(DestroyZoneRequest) returns (DestroyZoneReply); + + rpc ResolveZoneId(ResolveZoneIdRequest) returns (ResolveZoneIdReply); + + rpc GetZone(GetZoneRequest) returns (GetZoneReply); + + rpc ListZones(ListZonesRequest) returns (ListZonesReply); + + rpc AttachZoneConsole(stream ZoneConsoleRequest) returns (stream ZoneConsoleReply); + rpc ExecInsideZone(stream ExecInsideZoneRequest) returns (stream ExecInsideZoneReply); + rpc ReadZoneMetrics(ReadZoneMetricsRequest) returns (ReadZoneMetricsReply); + + rpc WatchEvents(WatchEventsRequest) returns (stream WatchEventsReply); } -message IdentifyHostRequest {} +message HostStatusRequest {} -message IdentifyHostReply { +message HostStatusReply { string host_uuid = 1; uint32 host_domid = 2; string krata_version = 3; @@ -45,36 +48,44 @@ message CreateZoneRequest { } message CreateZoneReply { - string Zone_id = 1; + string zone_id = 1; } message DestroyZoneRequest { - string Zone_id = 1; + string zone_id = 1; } message DestroyZoneReply {} -message ResolveZoneRequest { +message ResolveZoneIdRequest { string name = 1; } -message ResolveZoneReply { - krata.v1.common.Zone Zone = 1; +message ResolveZoneIdReply { + string zone_id = 1; +} + +message GetZoneRequest { + string zone_id = 1; +} + +message GetZoneReply { + krata.v1.common.Zone zone = 1; } message ListZonesRequest {} message ListZonesReply { - repeated krata.v1.common.Zone Zones = 1; + repeated krata.v1.common.Zone zones = 1; } -message ExecZoneRequest { - string Zone_id = 1; +message ExecInsideZoneRequest { + string zone_id = 1; krata.v1.common.ZoneTaskSpec task = 2; bytes data = 3; } -message ExecZoneReply { +message ExecInsideZoneReply { bool exited = 1; string error = 2; int32 exit_code = 3; @@ -83,7 +94,7 @@ message ExecZoneReply { } message ZoneConsoleRequest { - string Zone_id = 1; + string zone_id = 1; bytes data = 2; } @@ -95,16 +106,16 @@ message WatchEventsRequest {} message WatchEventsReply { oneof event { - ZoneChangedEvent Zone_changed = 1; + ZoneChangedEvent zone_changed = 1; } } message ZoneChangedEvent { - krata.v1.common.Zone Zone = 1; + krata.v1.common.Zone zone = 1; } message ReadZoneMetricsRequest { - string Zone_id = 1; + string zone_id = 1; } message ReadZoneMetricsReply { @@ -219,15 +230,15 @@ message HostCpuTopologyInfo { HostCpuTopologyClass class = 5; } -message HostCpuTopologyRequest {} +message GetHostCpuTopologyRequest {} -message HostCpuTopologyReply { +message GetHostCpuTopologyReply { repeated HostCpuTopologyInfo cpus = 1; } -message HostPowerManagementPolicyRequest {} - -message HostPowerManagementPolicy { +message SetHostPowerManagementPolicyRequest { string scheduler = 1; bool smt_awareness = 2; } + +message SetHostPowerManagementPolicyReply {} diff --git a/crates/network/src/autonet.rs b/crates/network/src/autonet.rs index ea80284..69fafa0 100644 --- a/crates/network/src/autonet.rs +++ b/crates/network/src/autonet.rs @@ -76,44 +76,44 @@ impl AutoNetworkWatcher { let mut networks: Vec = Vec::new(); for (uuid, zone) in &all_zones { - let Some(ref state) = zone.state else { + let Some(ref status) = zone.status else { continue; }; - if state.domid == u32::MAX { + if status.domid == u32::MAX { continue; } - let Some(ref network) = state.network else { + let Some(ref network_status) = status.network_status else { continue; }; - let Ok(zone_ipv4_cidr) = Ipv4Cidr::from_str(&network.zone_ipv4) else { + let Ok(zone_ipv4_cidr) = Ipv4Cidr::from_str(&network_status.zone_ipv4) else { continue; }; - let Ok(zone_ipv6_cidr) = Ipv6Cidr::from_str(&network.zone_ipv6) else { + let Ok(zone_ipv6_cidr) = Ipv6Cidr::from_str(&network_status.zone_ipv6) else { continue; }; - let Ok(zone_mac) = EthernetAddress::from_str(&network.zone_mac) else { + let Ok(zone_mac) = EthernetAddress::from_str(&network_status.zone_mac) else { continue; }; - let Ok(gateway_ipv4_cidr) = Ipv4Cidr::from_str(&network.gateway_ipv4) else { + let Ok(gateway_ipv4_cidr) = Ipv4Cidr::from_str(&network_status.gateway_ipv4) else { continue; }; - let Ok(gateway_ipv6_cidr) = Ipv6Cidr::from_str(&network.gateway_ipv6) else { + let Ok(gateway_ipv6_cidr) = Ipv6Cidr::from_str(&network_status.gateway_ipv6) else { continue; }; - let Ok(gateway_mac) = EthernetAddress::from_str(&network.gateway_mac) else { + let Ok(gateway_mac) = EthernetAddress::from_str(&network_status.gateway_mac) else { continue; }; networks.push(NetworkMetadata { - domid: state.domid, + domid: status.domid, uuid: *uuid, zone: NetworkSide { ipv4: zone_ipv4_cidr, diff --git a/crates/runtime/src/launch.rs b/crates/runtime/src/launch.rs index d0e7845..01e6cad 100644 --- a/crates/runtime/src/launch.rs +++ b/crates/runtime/src/launch.rs @@ -1,19 +1,21 @@ use std::collections::HashMap; use std::fs; -use std::net::IpAddr; use std::path::PathBuf; use std::sync::Arc; use advmac::MacAddr6; use anyhow::{anyhow, Result}; -use ipnetwork::IpNetwork; +use tokio::sync::Semaphore; +use uuid::Uuid; + use krata::launchcfg::{ LaunchInfo, LaunchNetwork, LaunchNetworkIpv4, LaunchNetworkIpv6, LaunchNetworkResolver, LaunchPackedFormat, LaunchRoot, }; use krataoci::packer::OciPackedImage; -use tokio::sync::Semaphore; -use uuid::Uuid; +pub use xenclient::{ + pci::PciBdf, DomainPciDevice as PciDevice, DomainPciRdmReservePolicy as PciRdmReservePolicy, +}; use xenclient::{DomainChannel, DomainConfig, DomainDisk, DomainNetworkInterface}; use xenplatform::domain::BaseDomainConfig; @@ -22,10 +24,6 @@ use crate::RuntimeContext; use super::{ZoneInfo, ZoneState}; -pub use xenclient::{ - pci::PciBdf, DomainPciDevice as PciDevice, DomainPciRdmReservePolicy as PciRdmReservePolicy, -}; - pub struct ZoneLaunchRequest { pub format: LaunchPackedFormat, pub kernel: Vec, @@ -40,6 +38,17 @@ pub struct ZoneLaunchRequest { pub debug: bool, pub image: OciPackedImage, pub addons_image: Option, + pub network: ZoneLaunchNetwork, +} + +pub struct ZoneLaunchNetwork { + pub ipv4: String, + pub ipv4_prefix: u8, + pub ipv6: String, + pub ipv6_prefix: u8, + pub gateway_ipv4: String, + pub gateway_ipv6: String, + pub zone_mac: MacAddr6, } pub struct ZoneLauncher { @@ -58,15 +67,7 @@ impl ZoneLauncher { ) -> Result { let uuid = request.uuid.unwrap_or_else(Uuid::new_v4); let xen_name = format!("krata-{uuid}"); - let mut gateway_mac = MacAddr6::random(); - gateway_mac.set_local(true); - gateway_mac.set_multicast(false); - let mut zone_mac = MacAddr6::random(); - zone_mac.set_local(true); - zone_mac.set_multicast(false); - let _launch_permit = self.launch_semaphore.acquire().await?; - let mut ip = context.ipvendor.assign(uuid).await?; let launch_config = LaunchInfo { root: LaunchRoot { format: request.format.clone(), @@ -81,12 +82,12 @@ impl ZoneLauncher { network: Some(LaunchNetwork { link: "eth0".to_string(), ipv4: LaunchNetworkIpv4 { - address: format!("{}/{}", ip.ipv4, ip.ipv4_prefix), - gateway: ip.gateway_ipv4.to_string(), + address: format!("{}/{}", request.network.ipv4, request.network.ipv4_prefix), + gateway: request.network.gateway_ipv4, }, ipv6: LaunchNetworkIpv6 { - address: format!("{}/{}", ip.ipv6, ip.ipv6_prefix), - gateway: ip.gateway_ipv6.to_string(), + address: format!("{}/{}", request.network.ipv6, request.network.ipv6_prefix), + gateway: request.network.gateway_ipv6.to_string(), }, resolver: LaunchNetworkResolver { nameservers: vec![ @@ -145,8 +146,7 @@ impl ZoneLauncher { } let cmdline = cmdline_options.join(" "); - let zone_mac_string = zone_mac.to_string().replace('-', ":"); - let gateway_mac_string = gateway_mac.to_string().replace('-', ":"); + let zone_mac_string = request.network.zone_mac.to_string().replace('-', ":"); let mut disks = vec![ DomainDisk { @@ -190,30 +190,6 @@ impl ZoneLauncher { let mut extra_keys = vec![ ("krata/uuid".to_string(), uuid.to_string()), ("krata/loops".to_string(), loops.join(",")), - ( - "krata/network/zone/ipv4".to_string(), - format!("{}/{}", ip.ipv4, ip.ipv4_prefix), - ), - ( - "krata/network/zone/ipv6".to_string(), - format!("{}/{}", ip.ipv6, ip.ipv6_prefix), - ), - ( - "krata/network/zone/mac".to_string(), - zone_mac_string.clone(), - ), - ( - "krata/network/gateway/ipv4".to_string(), - format!("{}/{}", ip.gateway_ipv4, ip.ipv4_prefix), - ), - ( - "krata/network/gateway/ipv6".to_string(), - format!("{}/{}", ip.gateway_ipv6, ip.ipv6_prefix), - ), - ( - "krata/network/gateway/mac".to_string(), - gateway_mac_string.clone(), - ), ]; if let Some(name) = request.name.as_ref() { @@ -251,29 +227,14 @@ impl ZoneLauncher { extra_rw_paths: vec!["krata/zone".to_string()], }; match context.xen.create(&config).await { - Ok(created) => { - ip.commit().await?; - Ok(ZoneInfo { - name: request.name.as_ref().map(|x| x.to_string()), - uuid, - domid: created.domid, - image: request.image.digest, - loops: vec![], - zone_ipv4: Some(IpNetwork::new(IpAddr::V4(ip.ipv4), ip.ipv4_prefix)?), - zone_ipv6: Some(IpNetwork::new(IpAddr::V6(ip.ipv6), ip.ipv6_prefix)?), - zone_mac: Some(zone_mac_string.clone()), - gateway_ipv4: Some(IpNetwork::new( - IpAddr::V4(ip.gateway_ipv4), - ip.ipv4_prefix, - )?), - gateway_ipv6: Some(IpNetwork::new( - IpAddr::V6(ip.gateway_ipv6), - ip.ipv6_prefix, - )?), - gateway_mac: Some(gateway_mac_string.clone()), - state: ZoneState { exit_code: None }, - }) - } + Ok(created) => Ok(ZoneInfo { + name: request.name.as_ref().map(|x| x.to_string()), + uuid, + domid: created.domid, + image: request.image.digest, + loops: vec![], + state: ZoneState { exit_code: None }, + }), Err(error) => { let _ = context.autoloop.unloop(&image_squashfs_loop.path).await; let _ = context.autoloop.unloop(&cfgblk_squashfs_loop.path).await; diff --git a/crates/runtime/src/lib.rs b/crates/runtime/src/lib.rs index 92dd589..e251526 100644 --- a/crates/runtime/src/lib.rs +++ b/crates/runtime/src/lib.rs @@ -1,12 +1,17 @@ -use std::{fs, net::Ipv4Addr, path::PathBuf, str::FromStr, sync::Arc}; +use std::{fs, path::PathBuf, str::FromStr, sync::Arc}; use anyhow::{anyhow, Result}; +<<<<<<< HEAD use ip::IpVendor; use ipnetwork::{IpNetwork, Ipv4Network, Ipv6Network}; use krataloopdev::LoopControl; use log::{debug, error}; +======= +>>>>>>> 267dc66 (feature(krata): rework api and make ip assignment persistent to database) use tokio::sync::Semaphore; use uuid::Uuid; + +use krataloopdev::LoopControl; use xenclient::XenClient; use xenstore::{XsdClient, XsdInterface}; @@ -19,7 +24,6 @@ use self::{ pub mod autoloop; pub mod cfgblk; pub mod channel; -pub mod ip; pub mod launch; pub mod power; @@ -48,12 +52,6 @@ pub struct ZoneInfo { pub domid: u32, pub image: String, pub loops: Vec, - pub zone_ipv4: Option, - pub zone_ipv6: Option, - pub zone_mac: Option, - pub gateway_ipv4: Option, - pub gateway_ipv6: Option, - pub gateway_mac: Option, pub state: ZoneState, } @@ -61,10 +59,10 @@ pub struct ZoneInfo { pub struct RuntimeContext { pub autoloop: AutoLoop, pub xen: XenClient, - pub ipvendor: IpVendor, } impl RuntimeContext { +<<<<<<< HEAD pub async fn new(host_uuid: Uuid) -> Result { debug!("initializing XenClient"); let xen = XenClient::new(0, RuntimePlatform::new()).await?; @@ -79,10 +77,17 @@ impl RuntimeContext { let autoloop = AutoLoop::new(LoopControl::open()?); debug!("krata runtime initialized!"); +======= + pub async fn new() -> Result { + let xen = XenClient::new(0, RuntimePlatform::new()).await?; +>>>>>>> 267dc66 (feature(krata): rework api and make ip assignment persistent to database) Ok(RuntimeContext { autoloop, xen, +<<<<<<< HEAD ipvendor, +======= +>>>>>>> 267dc66 (feature(krata): rework api and make ip assignment persistent to database) }) } @@ -123,61 +128,6 @@ impl RuntimeContext { .store .read_string(&format!("{}/krata/loops", &dom_path)) .await?; - let zone_ipv4 = self - .xen - .store - .read_string(&format!("{}/krata/network/zone/ipv4", &dom_path)) - .await?; - let zone_ipv6 = self - .xen - .store - .read_string(&format!("{}/krata/network/zone/ipv6", &dom_path)) - .await?; - let zone_mac = self - .xen - .store - .read_string(&format!("{}/krata/network/zone/mac", &dom_path)) - .await?; - let gateway_ipv4 = self - .xen - .store - .read_string(&format!("{}/krata/network/gateway/ipv4", &dom_path)) - .await?; - let gateway_ipv6 = self - .xen - .store - .read_string(&format!("{}/krata/network/gateway/ipv6", &dom_path)) - .await?; - let gateway_mac = self - .xen - .store - .read_string(&format!("{}/krata/network/gateway/mac", &dom_path)) - .await?; - - let zone_ipv4 = if let Some(zone_ipv4) = zone_ipv4 { - IpNetwork::from_str(&zone_ipv4).ok() - } else { - None - }; - - let zone_ipv6 = if let Some(zone_ipv6) = zone_ipv6 { - IpNetwork::from_str(&zone_ipv6).ok() - } else { - None - }; - - let gateway_ipv4 = if let Some(gateway_ipv4) = gateway_ipv4 { - IpNetwork::from_str(&gateway_ipv4).ok() - } else { - None - }; - - let gateway_ipv6 = if let Some(gateway_ipv6) = gateway_ipv6 { - IpNetwork::from_str(&gateway_ipv6).ok() - } else { - None - }; - let exit_code = self .xen .store @@ -198,12 +148,6 @@ impl RuntimeContext { domid, image, loops, - zone_ipv4, - zone_ipv6, - zone_mac, - gateway_ipv4, - gateway_ipv6, - gateway_mac, state, }); } @@ -245,16 +189,14 @@ impl RuntimeContext { #[derive(Clone)] pub struct Runtime { - host_uuid: Uuid, context: RuntimeContext, launch_semaphore: Arc, } impl Runtime { - pub async fn new(host_uuid: Uuid) -> Result { - let context = RuntimeContext::new(host_uuid).await?; + pub async fn new() -> Result { + let context = RuntimeContext::new().await?; Ok(Self { - host_uuid, context, launch_semaphore: Arc::new(Semaphore::new(10)), }) @@ -290,11 +232,6 @@ impl Runtime { return Err(anyhow!("unable to find krata uuid based on the domain",)); } let uuid = Uuid::parse_str(&uuid)?; - let ip = self - .context - .ipvendor - .read_domain_assignment(uuid, domid) - .await?; let loops = store .read_string(format!("{}/krata/loops", dom_path).as_str()) .await?; @@ -314,16 +251,6 @@ impl Runtime { } } } - - if let Some(ip) = ip { - if let Err(error) = self.context.ipvendor.recall(&ip).await { - error!( - "failed to recall ip assignment for zone {}: {}", - uuid, error - ); - } - } - Ok(uuid) } @@ -332,11 +259,11 @@ impl Runtime { } pub async fn dupe(&self) -> Result { - Runtime::new(self.host_uuid).await + Runtime::new().await } pub async fn power_management_context(&self) -> Result { - let context = RuntimeContext::new(self.host_uuid).await?; + let context = RuntimeContext::new().await?; Ok(PowerManagementContext { context }) } }