diff --git a/Cargo.lock b/Cargo.lock index a124b3ad..94da0a14 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,41 +2,20 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "able_graphics_library" -version = "0.1.2" -source = "git+https://git.ablecorp.us/ableos/ableos_userland#6c38f2b2f1f7f04b43a8def709de1da98cb5fba1" -dependencies = [ - "embedded-graphics", - "log", - "versioning", -] - [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "ahash" @@ -47,7 +26,7 @@ dependencies = [ "cfg-if", "once_cell", "version_check", - "zerocopy 0.7.35", + "zerocopy", ] [[package]] @@ -91,24 +70,24 @@ checksum = "7b7e4c2464d97fe331d41de9d5db0def0a96f4d823b8b32a2efd503578988973" [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets", ] [[package]] name = "base64" -version = "0.21.7" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "beef" @@ -184,33 +163,16 @@ dependencies = [ "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.6", -] - -[[package]] -name = "clparse" -version = "0.1.0" -source = "git+https://git.ablecorp.us/ableos/ableos_userland#6c38f2b2f1f7f04b43a8def709de1da98cb5fba1" -dependencies = [ - "hashbrown 0.14.5", - "log", - "toml 0.5.9", + "windows-targets", ] [[package]] name = "convert_case" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" dependencies = [ - "core-foundation-sys", - "libc", + "unicode-segmentation", ] [[package]] @@ -236,15 +198,24 @@ checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "derive_more" -version = "0.99.18" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version", "syn", + "unicode-xid", ] [[package]] @@ -256,9 +227,9 @@ dependencies = [ [[package]] name = "embedded-graphics" -version = "0.7.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "750082c65094fbcc4baf9ba31583ce9a8bb7f52cadfb96f6164b1bc7f922f32b" +checksum = "0649998afacf6d575d126d83e68b78c0ab0e00ca2ac7e9b3db11b4cbe8274ef0" dependencies = [ "az", "byteorder", @@ -269,21 +240,23 @@ dependencies = [ [[package]] name = "embedded-graphics-core" -version = "0.3.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8b1239db5f3eeb7e33e35bd10bd014e7b2537b17e071f726a09351431337cfa" +checksum = "ba9ecd261f991856250d2207f6d8376946cd9f412a2165d3b75bc87a0bc7a044" dependencies = [ "az", "byteorder", ] [[package]] -name = "encoding_rs" -version = "0.8.34" +name = "enumn" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ - "cfg-if", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -294,9 +267,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "error-stack" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27a72baa257b5e0e2de241967bc5ee8f855d6072351042688621081d66b2a76b" +checksum = "fe413319145d1063f080f27556fd30b1d70b01e2ba10c2a6e40d4be982ffc5d1" dependencies = [ "anyhow", "rustc_version", @@ -316,9 +289,9 @@ dependencies = [ [[package]] name = "float-cmp" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1267f4ac4f343772758f7b1bdcbe767c218bbab93bb432acbf5162bbf85a6c4" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" dependencies = [ "num-traits", ] @@ -345,6 +318,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", + "futures-sink", ] [[package]] @@ -379,6 +353,7 @@ checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", "futures-io", + "futures-sink", "futures-task", "memchr", "pin-project-lite", @@ -399,37 +374,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" - -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.8", -] +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "hashbrown" @@ -437,7 +384,7 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.11", + "ahash", "allocator-api2", ] @@ -483,9 +430,9 @@ checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "http" -version = "0.2.12" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -494,12 +441,24 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", "pin-project-lite", ] @@ -509,48 +468,61 @@ version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - [[package]] name = "hyper" -version = "0.14.30" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", - "h2", "http", "http-body", "httparse", - "httpdate", "itoa", "pin-project-lite", - "socket2", + "smallvec", "tokio", - "tower-service", - "tracing", "want", ] [[package]] name = "hyper-rustls" -version = "0.24.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http", "hyper", + "hyper-util", "rustls", + "rustls-pki-types", "tokio", "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[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]] @@ -593,7 +565,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown", ] [[package]] @@ -621,12 +593,10 @@ dependencies = [ name = "kernel" version = "0.2.0" dependencies = [ - "able_graphics_library", - "clparse", "crossbeam-queue", "derive_more", "embedded-graphics", - "hashbrown 0.14.5", + "hashbrown", "hbvm 0.1.0 (git+https://git.ablecorp.us/ableos/holey-bytes)", "kiam", "limine", @@ -639,7 +609,7 @@ dependencies = [ "versioning", "virtio-drivers", "x2apic", - "x86_64", + "x86_64 0.15.1", "xml", ] @@ -724,9 +694,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "micromath" -version = "1.1.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc4010833aea396656c2f91ee704d51a6f1329ec2ab56ffd00bfd56f7481ea94" +checksum = "c3c8dda44ff03a2f238717214da50f65d5a53b45cd213a7370424ffdb6fae815" [[package]] name = "mime" @@ -736,11 +706,11 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] @@ -791,6 +761,26 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[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", +] + [[package]] name = "pin-project-lite" version = "0.2.14" @@ -803,6 +793,15 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -812,6 +811,54 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "quinn" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +dependencies = [ + "bytes", + "rand", + "ring", + "rustc-hash", + "rustls", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" +dependencies = [ + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "quote" version = "1.0.37" @@ -821,11 +868,35 @@ dependencies = [ "proc-macro2", ] +[[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 = "raw-cpuid" @@ -861,25 +932,26 @@ dependencies = [ "hblang", "reqwest", "str-reader", - "toml 0.5.11", + "toml", ] [[package]] name = "reqwest" -version = "0.11.27" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" dependencies = [ "base64", "bytes", - "encoding_rs", + "futures-channel", "futures-core", "futures-util", - "h2", "http", "http-body", + "http-body-util", "hyper", "hyper-rustls", + "hyper-util", "ipnet", "js-sys", "log", @@ -887,13 +959,14 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "quinn", "rustls", "rustls-pemfile", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", - "system-configuration", "tokio", "tokio-rustls", "tower-service", @@ -902,7 +975,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "webpki-roots", - "winreg", + "windows-registry", ] [[package]] @@ -926,6 +999,12 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc_version" version = "0.4.1" @@ -937,32 +1016,42 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.12" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ - "log", + "once_cell", "ring", + "rustls-pki-types", "rustls-webpki", - "sct", + "subtle", + "zeroize", ] [[package]] name = "rustls-pemfile" -version = "1.0.4" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ "base64", + "rustls-pki-types", ] [[package]] -name = "rustls-webpki" -version = "0.101.7" +name = "rustls-pki-types" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" + +[[package]] +name = "rustls-webpki" +version = "0.102.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" dependencies = [ "ring", + "rustls-pki-types", "untrusted", ] @@ -990,16 +1079,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "semver" version = "1.0.23" @@ -1038,6 +1117,15 @@ dependencies = [ "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" @@ -1065,6 +1153,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + [[package]] name = "socket2" version = "0.5.7" @@ -1090,6 +1184,12 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6aa20b89aec46e0bffbb8756e089beb4c43bbec53d0667de34212f048bdab10" +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + [[package]] name = "syn" version = "2.0.77" @@ -1103,29 +1203,31 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", + "futures-core", ] [[package]] -name = "system-configuration-sys" -version = "0.5.0" +name = "thiserror" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ - "core-foundation-sys", - "libc", + "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", ] [[package]] @@ -1160,44 +1262,69 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.24.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ "rustls", + "rustls-pki-types", "tokio", ] [[package]] -name = "tokio-util" -version = "0.7.12" +name = "toml" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ - "bytes", "futures-core", - "futures-sink", + "futures-util", + "pin-project", "pin-project-lite", "tokio", + "tower-layer", + "tower-service", ] [[package]] -name = "toml" -version = "0.5.9" -source = "git+https://git.ablecorp.us/asya/toml-rs#4379150168e87103739a196566a7ce17ff245f01" -dependencies = [ - "hashbrown 0.12.3", - "serde", -] - -[[package]] -name = "toml" -version = "0.5.11" +name = "tower-layer" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" @@ -1232,13 +1359,13 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "uart_16550" -version = "0.2.19" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614ff2a87880d4bd4374722268598a970bbad05ced8bf630439417347254ab2e" +checksum = "4922792855b1bce30997fbaa5418597902c278a92d20dfe348e6f062c3bd861d" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "rustversion", - "x86_64", + "x86", ] [[package]] @@ -1262,6 +1389,18 @@ 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-xid" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" + [[package]] name = "untrusted" version = "0.9.0" @@ -1295,13 +1434,14 @@ dependencies = [ [[package]] name = "virtio-drivers" -version = "0.4.0" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42299957c6f61af586fe3eae398c16ec07f33a02579fa1d41ae96156ce437029" +checksum = "d6a39747311dabb3d37807037ed1c3c38d39f99198d091b5b79ecd5c8d82f799" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", + "enumn", "log", - "zerocopy 0.6.6", + "zerocopy", ] [[package]] @@ -1404,9 +1544,12 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.4" +version = "0.26.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +checksum = "0bd24728e5af82c6c4ec1b66ac4844bdf8156257fccda846ec58b42cd0cdbe6a" +dependencies = [ + "rustls-pki-types", +] [[package]] name = "windows-core" @@ -1414,16 +1557,37 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] -name = "windows-sys" -version = "0.48.0" +name = "windows-registry" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ - "windows-targets 0.48.5", + "windows-result", + "windows-strings", + "windows-targets", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets", ] [[package]] @@ -1432,22 +1596,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 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", + "windows-targets", ] [[package]] @@ -1456,46 +1614,28 @@ 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_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "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", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[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" @@ -1508,48 +1648,24 @@ 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" @@ -1557,13 +1673,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "winreg" -version = "0.50.0" +name = "winnow" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ - "cfg-if", - "windows-sys 0.48.0", + "memchr", ] [[package]] @@ -1576,7 +1691,18 @@ dependencies = [ "bitflags 1.3.2", "paste", "raw-cpuid", - "x86_64", + "x86_64 0.14.12", +] + +[[package]] +name = "x86" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2781db97787217ad2a2845c396a5efe286f87467a5810836db6d74926e94a385" +dependencies = [ + "bit_field", + "bitflags 1.3.2", + "raw-cpuid", ] [[package]] @@ -1591,6 +1717,18 @@ dependencies = [ "volatile", ] +[[package]] +name = "x86_64" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bc79523af8abf92fb1a970c3e086c5a343f6bcc1a0eb890f575cbb3b45743df" +dependencies = [ + "bit_field", + "bitflags 2.6.0", + "rustversion", + "volatile", +] + [[package]] name = "xml" version = "0.1.0" @@ -1599,34 +1737,14 @@ dependencies = [ "serde", ] -[[package]] -name = "zerocopy" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854e949ac82d619ee9a14c66a1b674ac730422372ccb759ce0c39cabcf2bf8e6" -dependencies = [ - "byteorder", - "zerocopy-derive 0.6.6", -] - [[package]] name = "zerocopy" version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ - "zerocopy-derive 0.7.35", -] - -[[package]] -name = "zerocopy-derive" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "125139de3f6b9d625c39e2efdd73d41bdac468ccd556556440e322be0e1bbd91" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "byteorder", + "zerocopy-derive", ] [[package]] @@ -1639,3 +1757,9 @@ dependencies = [ "quote", "syn", ] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" diff --git a/Cargo.toml b/Cargo.toml index 85e0ede6..2a294677 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,9 @@ [workspace] resolver = "2" -members = [ "dev","kernel", "repbuild"] +members = ["dev", "kernel", "repbuild"] + +[profile.release] +strip = "symbols" +codegen-units = 1 +lto = true +panic = "abort" diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index 27c8c8b4..59e964fb 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -5,17 +5,17 @@ version = "0.2.0" [dependencies] -embedded-graphics = "0.7" +embedded-graphics = "0.8" hbvm.git = "https://git.ablecorp.us/ableos/holey-bytes" log = "0.4" spin = "0.9" -uart_16550 = "0.2" +uart_16550 = "0.3" slab = { version = "0.4", default-features = false } xml.git = "https://git.ablecorp.us/ableos/ableos_userland" versioning.git = "https://git.ablecorp.us/ableos/ableos_userland" -able_graphics_library.git = "https://git.ablecorp.us/ableos/ableos_userland" -hashbrown = "*" -kiam = "0.1.1" +# able_graphics_library.git = "https://git.ablecorp.us/ableos/ableos_userland" +hashbrown = "0.14" +kiam = "0.1" [dependencies.limine] version = "0.1" @@ -26,12 +26,12 @@ version = "0.3" default-features = false features = ["alloc"] -[dependencies.clparse] -git = "https://git.ablecorp.us/ableos/ableos_userland" -default-features = false +# [dependencies.clparse] +# git = "https://git.ablecorp.us/ableos/ableos_userland" +# default-features = false [dependencies.derive_more] -version = "0.99" +version = "1" default-features = false features = [ "add", @@ -48,9 +48,9 @@ features = [ [target.'cfg(target_arch = "x86_64")'.dependencies] -x86_64 = "0.14" +x86_64 = "0.15" x2apic = "0.4" -virtio-drivers = "0.4.0" +virtio-drivers = "0.7" # rdrand = "*" rdrand = { version = "0.8", default-features = false } diff --git a/kernel/src/arch/x86_64/gdt.rs b/kernel/src/arch/x86_64/gdt.rs index 4bc32b21..c9d491c8 100644 --- a/kernel/src/arch/x86_64/gdt.rs +++ b/kernel/src/arch/x86_64/gdt.rs @@ -39,7 +39,7 @@ static TSS: Lazy = Lazy::new(|| { alloc::alloc::Layout::from_size_align(SIZE, 1).expect("stack pointer"), ) }; - VirtAddr::from_ptr(stack) + SIZE + VirtAddr::from_ptr(stack) + SIZE as u64 }; tss }); @@ -47,9 +47,9 @@ static TSS: Lazy = Lazy::new(|| { static GDT: Lazy<(GlobalDescriptorTable, Selectors)> = Lazy::new(|| { let mut gdt = GlobalDescriptorTable::new(); let sels = Selectors { - kcode: gdt.add_entry(Descriptor::kernel_code_segment()), - kdata: gdt.add_entry(Descriptor::kernel_data_segment()), - tss: gdt.add_entry(Descriptor::tss_segment(&TSS)), + kcode: gdt.append(Descriptor::kernel_code_segment()), + kdata: gdt.append(Descriptor::kernel_data_segment()), + tss: gdt.append(Descriptor::tss_segment(&TSS)), }; (gdt, sels) }); diff --git a/kernel/src/arch/x86_64/interrupts.rs b/kernel/src/arch/x86_64/interrupts.rs index bc7ea2ff..08e7aa0d 100644 --- a/kernel/src/arch/x86_64/interrupts.rs +++ b/kernel/src/arch/x86_64/interrupts.rs @@ -45,9 +45,9 @@ static IDT: Lazy = Lazy::new(|| { } idt.page_fault.set_handler_fn(page_fault); - idt[Interrupt::ApicErr as usize].set_handler_fn(apic_err); - idt[Interrupt::Spurious as usize].set_handler_fn(spurious); - idt[Interrupt::Timer as usize].set_handler_fn(timer); + idt[Interrupt::ApicErr as u8].set_handler_fn(apic_err); + idt[Interrupt::Spurious as u8].set_handler_fn(spurious); + idt[Interrupt::Timer as u8].set_handler_fn(timer); idt }); diff --git a/kernel/src/arch/x86_64/logging.rs b/kernel/src/arch/x86_64/logging.rs index 5652b255..13fd49e6 100644 --- a/kernel/src/arch/x86_64/logging.rs +++ b/kernel/src/arch/x86_64/logging.rs @@ -1,11 +1,6 @@ //! Logging (as in terms of console / serial output) #![allow(deprecated)] -use { - core::fmt::Write, - limine::{TerminalRequest, TerminalResponse}, - spin::{Lazy, Mutex}, - uart_16550::SerialPort, -}; +use {core::fmt::Write, spin::Mutex, uart_16550::SerialPort}; pub static SERIAL_CONSOLE: Mutex = Mutex::new(unsafe { SerialPort::new(0x3F8) }); diff --git a/kernel/src/arch/x86_64/mod.rs b/kernel/src/arch/x86_64/mod.rs index 7437b1e4..7451f297 100644 --- a/kernel/src/arch/x86_64/mod.rs +++ b/kernel/src/arch/x86_64/mod.rs @@ -1,7 +1,4 @@ -use { - crate::bootmodules::BootModule, core::arch::asm, embedded_graphics::pixelcolor::Rgb888, - log::warn, rdrand::RdSeed, -}; +use {crate::bootmodules::BootModule, core::arch::asm, log::warn, rdrand::RdSeed}; pub mod memory; mod cpuid; @@ -208,7 +205,7 @@ pub fn hardware_random_u64() -> u64 { trace!("Random {}", ret); return ret; } - Err(err) => { + Err(_) => { warn!("RDRand not supported."); // Try rdseed let gen = RdSeed::new(); @@ -218,7 +215,7 @@ pub fn hardware_random_u64() -> u64 { trace!("Random {}", ret); return ret; } - Err(err) => { + Err(_) => { panic!("Neither RDRand or RDSeed are supported") } } @@ -235,7 +232,7 @@ pub fn hardware_random_u32() -> u32 { trace!("Random {}", ret); return ret; } - Err(err) => { + Err(_) => { warn!("RDRand not supported."); // Try rdseed let gen = RdSeed::new(); @@ -245,7 +242,7 @@ pub fn hardware_random_u32() -> u32 { trace!("Random {}", ret); return ret; } - Err(err) => { + Err(_) => { panic!("Neither RDRand or RDSeed are supported") } } @@ -255,6 +252,7 @@ pub fn hardware_random_u32() -> u32 { pub fn get_edid() {} +#[allow(unused)] pub fn register_dump() { let rax: u64; let rbx: u64 = 0; diff --git a/kernel/src/bootmodules.rs b/kernel/src/bootmodules.rs index 729bd926..b8595eea 100644 --- a/kernel/src/bootmodules.rs +++ b/kernel/src/bootmodules.rs @@ -1,10 +1,10 @@ use { - crate::alloc::string::ToString, + // crate::alloc::string::ToString, alloc::{string::String, vec::Vec}, - clparse::Arguments, - core::fmt::{Debug, Display}, - log::trace, - xml::XMLElement, + // clparse::Arguments, + // core::fmt::{Debug, Display}, + // log::trace, + // xml::XMLElement, }; pub type BootModules = Vec; @@ -19,18 +19,18 @@ impl BootModule { } } -pub fn build_cmd(name: T, cmdline: T) -> XMLElement { - let mut cmdline = cmdline.to_string(); - cmdline.pop(); - cmdline.remove(0); +// pub fn build_cmd(name: T, cmdline: T) -> XMLElement { +// let mut cmdline = cmdline.to_string(); +// cmdline.pop(); +// cmdline.remove(0); - let cmd = Arguments::parse(cmdline.to_string()).unwrap(); - trace!("Cmdline: {cmd:?}"); +// let cmd = Arguments::parse(cmdline.to_string()).unwrap(); +// trace!("Cmdline: {cmd:?}"); - let mut clo = XMLElement::new(name); - for (key, value) in cmd.arguments { - clo.set_attribute(key, value); - } - trace!("command line object: {:?}", clo); - clo -} +// let mut clo = XMLElement::new(name); +// for (key, value) in cmd.arguments { +// clo.set_attribute(key, value); +// } +// trace!("command line object: {:?}", clo); +// clo +// } diff --git a/kernel/src/holeybytes/ecah.rs b/kernel/src/holeybytes/ecah.rs index 616aaa8a..50f12d6e 100644 --- a/kernel/src/holeybytes/ecah.rs +++ b/kernel/src/holeybytes/ecah.rs @@ -1,18 +1,10 @@ //! Environment call handling routines -use core::borrow::Borrow; - -use crate::{ - allocator, - holeybytes::kernel_services::{ - block_read, - service_definition_service::{sds_msg_handler, SERVICES}, - }, -}; +use crate::holeybytes::kernel_services::{block_read, service_definition_service::sds_msg_handler}; use { - super::{mem::Memory, Vm}, - crate::{arch, holeybytes::mem, ipc::buffer::IpcBuffer, kmain::IPC_BUFFERS}, + super::Vm, + crate::{arch, ipc::buffer::IpcBuffer, kmain::IPC_BUFFERS}, alloc::string::String, log::{debug, error, info, trace, warn}, }; @@ -78,7 +70,7 @@ pub fn handler(vm: &mut Vm) { }, 1 => match log_msg_handler(vm, mem_addr, length) { Ok(()) => {} - Err(err) => log::error!("Improper log format"), + Err(_) => log::error!("Improper log format"), }, 2 => { use crate::holeybytes::kernel_services::mem_serve::memory_msg_handler; @@ -107,7 +99,7 @@ pub fn handler(vm: &mut Vm) { x86_64::instructions::port::Port::new(address).write(value); } - let mut msg_vec = block_read(mem_addr, length); + let msg_vec = block_read(mem_addr, length); let msg_type = msg_vec[0]; match msg_type { 0 => 'wow: { @@ -203,7 +195,7 @@ pub fn handler(vm: &mut Vm) { let max_length = vm.registers[5].cast::(); let mut buffs = IPC_BUFFERS.lock(); - let mut buff: &mut IpcBuffer; + let buff: &mut IpcBuffer; if buffs.get_mut(&buffer_id).is_some() { buff = buffs.get_mut(&buffer_id).unwrap(); @@ -252,7 +244,7 @@ pub fn handler(vm: &mut Vm) { } } -fn log_msg_handler(vm: &mut Vm, mem_addr: u64, length: usize) -> Result<(), LogError> { +fn log_msg_handler(_vm: &mut Vm, mem_addr: u64, length: usize) -> Result<(), LogError> { // let message_length = 8 + 8 + 8; // log::info!("Mem Addr 0x{:x?} length {}", mem_addr, length); let mut msg_vec = block_read(mem_addr, length); @@ -261,7 +253,7 @@ fn log_msg_handler(vm: &mut Vm, mem_addr: u64, length: usize) -> Result<(), LogE match String::from_utf8(msg_vec) { Ok(strr) => { // use LogLevel::*; - let ll = match log_level { + let _ll = match log_level { 0 | 48 => error!("{}", strr), 1 | 49 => warn!("{}", strr), 2 | 50 => info!("{}", strr), @@ -285,8 +277,8 @@ pub enum LogError { NoMessages, InvalidLogFormat, } -use {alloc::vec, log::Record}; +// use {alloc::vec, log::Record}; // fn memory_msg_handler(vm: &mut Vm, mem_addr: u64, length: usize) -> Result<(), LogError> { // let mut val = alloc::vec::Vec::new(); // for _ in 0..4096 { diff --git a/kernel/src/holeybytes/kernel_services/mem_serve.rs b/kernel/src/holeybytes/kernel_services/mem_serve.rs index 8965dbb0..feeba2e7 100644 --- a/kernel/src/holeybytes/kernel_services/mem_serve.rs +++ b/kernel/src/holeybytes/kernel_services/mem_serve.rs @@ -1,19 +1,10 @@ use { - crate::holeybytes::{ - ecah::LogError, - kernel_services::{block_read, mem_serve}, - Vm, - }, - alloc::{ - alloc::{alloc_zeroed, dealloc}, - vec::Vec, - }, + crate::holeybytes::{kernel_services::block_read, Vm}, + alloc::alloc::{alloc_zeroed, dealloc}, core::alloc::Layout, log::{debug, info}, }; -use alloc::vec; - pub enum MemoryServiceError { InvalidMemoryFormat, } @@ -25,7 +16,7 @@ pub enum MemoryQuotaType { KillQuota = 3, } -fn alloc_page(vm: &mut Vm, mem_addr: u64, length: usize) -> Result<(), MemoryServiceError> { +fn alloc_page(vm: &mut Vm, _mem_addr: u64, _length: usize) -> Result<(), MemoryServiceError> { let ptr = unsafe { alloc_zeroed(Layout::new::<[u8; 4096]>()) }; info!("Block address: {:?}", ptr); vm.registers[1] = hbvm::value::Value(ptr as u64); @@ -38,7 +29,7 @@ pub fn memory_msg_handler( mem_addr: u64, length: usize, ) -> Result<(), MemoryServiceError> { - let mut msg_vec = block_read(mem_addr, length); + let msg_vec = block_read(mem_addr, length); let msg_type = msg_vec[0]; match msg_type { 0 => { @@ -84,7 +75,7 @@ pub fn memory_msg_handler( let hid_raw: [u8; 8] = msg_vec[2..10].try_into().unwrap(); let hid: u64 = u64::from_le_bytes(hid_raw); let pid_raw: [u8; 8] = msg_vec[10..18].try_into().unwrap(); - let pid: u64 = u64::from_le_bytes(hid_raw); + let pid: u64 = u64::from_le_bytes(pid_raw); debug!( "Setting HID-{:x}:PID-{:x}'s quota type to {:?}", hid, pid, quota_type diff --git a/kernel/src/holeybytes/kernel_services/mod.rs b/kernel/src/holeybytes/kernel_services/mod.rs index 367a63d2..c08f2ac9 100644 --- a/kernel/src/holeybytes/kernel_services/mod.rs +++ b/kernel/src/holeybytes/kernel_services/mod.rs @@ -1,4 +1,4 @@ -use alloc::{vec, vec::Vec}; +use alloc::vec::Vec; pub mod mem_serve; pub mod service_definition_service; diff --git a/kernel/src/holeybytes/kernel_services/service_definition_service.rs b/kernel/src/holeybytes/kernel_services/service_definition_service.rs index 547ac337..0a8f696c 100644 --- a/kernel/src/holeybytes/kernel_services/service_definition_service.rs +++ b/kernel/src/holeybytes/kernel_services/service_definition_service.rs @@ -1,12 +1,8 @@ use { crate::{ - alloc::string::ToString, arch::hardware_random_u64, holeybytes::{ecah::LogError, kernel_services::block_read, Vm}, - ipc::{ - buffer::IpcBuffer, - protocol::{self, Protocol}, - }, + ipc::{buffer::IpcBuffer, protocol::Protocol}, kmain::IPC_BUFFERS, }, alloc::string::String, @@ -100,7 +96,7 @@ fn sds_create_service(protocol: String) -> u64 { } fn sds_search_service(protocol: String) -> u64 { - let mut services = SERVICES.lock(); + let services = SERVICES.lock(); let compare = Protocol::from(protocol.clone()); for (bid, protocol_canidate) in &services.0 { trace!("BID-{bid} protocol_canidate {:?}", protocol_canidate); diff --git a/kernel/src/holeybytes/mem.rs b/kernel/src/holeybytes/mem.rs index e9024c57..a85a6f20 100644 --- a/kernel/src/holeybytes/mem.rs +++ b/kernel/src/holeybytes/mem.rs @@ -7,7 +7,7 @@ use hbvm::mem::Address; fn calc_start_of_page(ptr: u64) -> u64 { - let mut page_aligned = false; + let _page_aligned = false; if ptr % 4096 == 0 { // page_aligned = true; return ptr / 4096; @@ -21,11 +21,11 @@ pub struct Memory { impl Memory { #[cfg(target_arch = "x86_64")] - fn read_device(addr: Address) { - unsafe { - // - // x86_64::instructions::port::Port::new(addr.get()).read() - } + fn read_device(_addr: Address) { + //unsafe { + // + // x86_64::instructions::port::Port::new(addr.get()).read() + //} } } @@ -37,7 +37,6 @@ impl hbvm::mem::Memory for Memory { target: *mut u8, count: usize, ) -> Result<(), hbvm::mem::LoadError> { - use log::{error, info}; if addr.get() % 4096 == 0 {} core::ptr::copy(addr.get() as *const u8, target, count); Ok(()) diff --git a/kernel/src/holeybytes/mod.rs b/kernel/src/holeybytes/mod.rs index 6ae91ca7..a8d31b9b 100644 --- a/kernel/src/holeybytes/mod.rs +++ b/kernel/src/holeybytes/mod.rs @@ -3,30 +3,33 @@ mod kernel_services; mod mem; use { - crate::{arch, ipc::buffer::IpcBuffer, kmain::IPC_BUFFERS}, - alloc::boxed::Box, - core::{default, future::Future, marker::PhantomData, ptr::NonNull, task::Poll}, + core::{ + alloc::Layout, + future::Future, + marker::PhantomData, + pin::Pin, + ptr::NonNull, + task::{Context, Poll}, + }, hbvm::{ - mem::{ - softpaging::{icache::ICache, HandlePageFault, SoftPagedMem}, - Address, Memory, - }, + mem::{softpaging::HandlePageFault, Address}, VmRunError, VmRunOk, }, - log::{debug, error, info, trace, warn}, + log::error, }; const STACK_SIZE: usize = 1024 * 1024; -const TIMER_QUOTIENT: usize = 100; +const TIMER_QUOTIENT: usize = 1000; type Vm = hbvm::Vm; pub struct ExecThread<'p> { vm: Vm, - stack_bottom: *mut u8, + stack_bottom: NonNull, _phantom: PhantomData<&'p [u8]>, } unsafe impl<'p> Send for ExecThread<'p> {} + impl<'p> ExecThread<'p> { pub fn set_arguments(&mut self, ptr: u64, length: u64) { self.vm.registers[1] = hbvm::value::Value(ptr); @@ -34,55 +37,60 @@ impl<'p> ExecThread<'p> { } pub unsafe fn new(program: &'p [u8], entrypoint: Address) -> Self { - let mut vm = unsafe { - Vm::new( - mem::Memory {}, - Address::new(program.as_ptr() as u64 + entrypoint.get()), - ) - }; + let mut vm = Vm::new( + mem::Memory {}, + Address::new(program.as_ptr() as u64 + entrypoint.get()), + ); - let stack_bottom = unsafe { allocate_stack().as_ptr() }; - vm.write_reg(254, (stack_bottom as usize + STACK_SIZE - 1) as u64); + let stack_bottom = allocate_stack(); + + vm.write_reg( + 254, + (stack_bottom.as_ptr() as usize + STACK_SIZE - 1) as u64, + ); ExecThread { vm, stack_bottom, - _phantom: Default::default(), + _phantom: PhantomData, } } } impl<'p> Drop for ExecThread<'p> { fn drop(&mut self) { - unsafe { alloc::alloc::dealloc(self.stack_bottom, stack_layout()) }; + unsafe { alloc::alloc::dealloc(self.stack_bottom.as_ptr(), stack_layout()) }; } } impl<'p> Future for ExecThread<'p> { type Output = Result<(), VmRunError>; - fn poll( - mut self: core::pin::Pin<&mut Self>, - cx: &mut core::task::Context<'_>, - ) -> Poll { + fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { match self.vm.run() { Err(err) => { - log::error!("HBVM Error\r\nRegister dump: {:?}", self.vm.registers,); - return Poll::Ready(Err(err)); + error!("HBVM Error\r\nRegister dump: {:?}", self.vm.registers); + Poll::Ready(Err(err)) + } + Ok(VmRunOk::End) => Poll::Ready(Ok(())), + Ok(VmRunOk::Ecall) => { + ecah::handler(&mut self.vm); + cx.waker().wake_by_ref(); + Poll::Pending + } + Ok(VmRunOk::Timer) => { + cx.waker().wake_by_ref(); + Poll::Pending } - Ok(VmRunOk::End) => return Poll::Ready(Ok(())), - Ok(VmRunOk::Ecall) => ecah::handler(&mut self.vm), - Ok(VmRunOk::Timer) => (), Ok(VmRunOk::Breakpoint) => { - log::error!( + error!( "HBVM Debug breakpoint\r\nRegister dump: {:?}", - self.vm.registers, + self.vm.registers ); + cx.waker().wake_by_ref(); + Poll::Pending } } - - cx.waker().wake_by_ref(); - Poll::Pending } } @@ -91,33 +99,23 @@ impl HandlePageFault for PageFaultHandler { fn page_fault( &mut self, reason: hbvm::mem::MemoryAccessReason, - pagetable: &mut hbvm::mem::softpaging::paging::PageTable, + _pagetable: &mut hbvm::mem::softpaging::paging::PageTable, vaddr: hbvm::mem::Address, size: hbvm::mem::softpaging::PageSize, dataptr: *mut u8, - ) -> bool - where - Self: Sized, - { - log::error!( - "REASON: {reason} \ - vaddr: {vaddr} \ - size: {size:?} \ - Dataptr {dataptr:p}", - ); + ) -> bool { + error!("REASON: {reason} vaddr: {vaddr} size: {size:?} Dataptr {dataptr:p}"); false } } -const fn stack_layout() -> core::alloc::Layout { - unsafe { alloc::alloc::Layout::from_size_align_unchecked(STACK_SIZE, 4096) } +const fn stack_layout() -> Layout { + unsafe { Layout::from_size_align_unchecked(STACK_SIZE, 4096) } } fn allocate_stack() -> NonNull { let layout = stack_layout(); - match NonNull::new(unsafe { alloc::alloc::alloc_zeroed(layout) }) { - Some(ptr) => ptr, - None => alloc::alloc::handle_alloc_error(layout), - } + NonNull::new(unsafe { alloc::alloc::alloc_zeroed(layout) }) + .unwrap_or_else(|| alloc::alloc::handle_alloc_error(layout)) } diff --git a/kernel/src/ipc/buffer.rs b/kernel/src/ipc/buffer.rs index 85c98f92..bdbfce9d 100644 --- a/kernel/src/ipc/buffer.rs +++ b/kernel/src/ipc/buffer.rs @@ -24,7 +24,7 @@ impl IpcBuffer { length ); match (bounded, length) { - (false, a) => { + (false, ..) => { let buftype = BufferTypes::Unbound(SegQueue::new()); Self { diff --git a/kernel/src/ipc/protocol.rs b/kernel/src/ipc/protocol.rs index e8cead34..1b45a9e9 100644 --- a/kernel/src/ipc/protocol.rs +++ b/kernel/src/ipc/protocol.rs @@ -1,7 +1,6 @@ use { alloc::{string::String, vec::Vec}, hashbrown::HashMap, - log::info, }; #[derive(Debug, PartialEq, Clone)] pub struct Type {} diff --git a/kernel/src/kmain.rs b/kernel/src/kmain.rs index 0c6790c0..f385b31c 100644 --- a/kernel/src/kmain.rs +++ b/kernel/src/kmain.rs @@ -2,27 +2,25 @@ use { crate::{ - arch::{hardware_random_u64, logging::SERIAL_CONSOLE}, - bootmodules::{build_cmd, BootModules}, - capabilities, + arch::hardware_random_u64, + bootmodules::BootModules, + //bootmodules::build_cmd, device_tree::DeviceTree, holeybytes::ExecThread, - ipc::buffer::{self, IpcBuffer}, + ipc::buffer::IpcBuffer, }, - alloc::format, hashbrown::HashMap, hbvm::mem::Address, limine::{Framebuffer, FramebufferRequest, NonNullPtr}, - log::{debug, info, trace}, + log::{debug, info}, spin::{Lazy, Mutex}, - xml::XMLElement, }; -pub fn kmain(cmdline: &str, boot_modules: BootModules) -> ! { +pub fn kmain(_cmdline: &str, boot_modules: BootModules) -> ! { debug!("Entered kmain"); - let kcmd = build_cmd("Kernel Command Line", cmdline); - trace!("Cmdline: {kcmd:?}"); + // let kcmd = build_cmd("Kernel Command Line", cmdline); + // trace!("Cmdline: {kcmd:?}"); // for (i, bm) in boot_modules.iter().enumerate() { // let name = format!("module-{}", i); @@ -108,7 +106,6 @@ pub static DEVICE_TREE: Lazy> = Lazy::new(|| { }); pub static FB_REQ: FramebufferRequest = FramebufferRequest::new(0); -use alloc::vec::Vec; pub type IpcBuffers = HashMap; pub static IPC_BUFFERS: Lazy> = Lazy::new(|| { let mut bufs = HashMap::new(); diff --git a/kernel/src/lib.rs b/kernel/src/lib.rs index 85873698..7963c372 100644 --- a/kernel/src/lib.rs +++ b/kernel/src/lib.rs @@ -5,7 +5,6 @@ #![feature( abi_x86_interrupt, alloc_error_handler, - panic_info_message, ptr_sub_ptr, custom_test_frameworks, naked_functions, @@ -40,6 +39,7 @@ pub const VERSION: Version = Version { }; #[panic_handler] +#[cfg(target_os = "none")] fn panic(info: &core::panic::PanicInfo) -> ! { arch::register_dump(); @@ -52,10 +52,8 @@ fn panic(info: &core::panic::PanicInfo) -> ! { )); } - if let Some(msg) = info.message() { - let _ = crate::arch::log(format_args!("{msg}\r\n")); - } - + let msg = info.message(); + let _ = crate::arch::log(format_args!("{msg}\r\n")); loop {} } diff --git a/kernel/src/logger.rs b/kernel/src/logger.rs index b403fa9f..fd9cc4a5 100644 --- a/kernel/src/logger.rs +++ b/kernel/src/logger.rs @@ -1,3 +1,4 @@ +#![allow(deprecated)] // TODO: Add a logger api with logger levels and various outputs pub static TERMINAL_LOGGER: Lazy> = Lazy::new(|| Mutex::new(TermLogger::new())); diff --git a/kernel/src/memory.rs b/kernel/src/memory.rs index 15b5db1c..1f0a2fca 100644 --- a/kernel/src/memory.rs +++ b/kernel/src/memory.rs @@ -1,7 +1,6 @@ //! The Memory Manager -use alloc::collections::VecDeque; -use derive_more::*; +use {alloc::collections::VecDeque, derive_more::*}; pub use crate::arch::PAGE_SIZE; pub const MAX_ORDER: usize = 10; @@ -44,7 +43,7 @@ pub const MAX_ORDER: usize = 10; Sum, UpperHex, )] -#[display(fmt = "0x{:x}", _0)] +#[display("0x{:x}", _0)] #[from(forward)] pub struct VirtualAddress(usize); @@ -55,11 +54,11 @@ impl VirtualAddress { pub fn vpns(&self) -> [usize; 3] { [ // [20:12] - (self.0 >> 12) & 0x1ff, + (self.0 >> 12) & 0x1FF, // [29:21] - (self.0 >> 21) & 0x1ff, + (self.0 >> 21) & 0x1FF, // [38:30] - (self.0 >> 30) & 0x1ff, + (self.0 >> 30) & 0x1FF, ] } @@ -114,7 +113,7 @@ impl VirtualAddress { Sum, UpperHex, )] -#[display(fmt = "0x{:x}", _0)] +#[display("0x{:x}", _0)] #[from(forward)] pub struct PhysicalAddress(usize); @@ -125,11 +124,11 @@ impl PhysicalAddress { pub fn ppns(&self) -> [usize; 3] { [ // [20:12] - (self.0 >> 12) & 0x1ff, + (self.0 >> 12) & 0x1FF, // [29:21] - (self.0 >> 21) & 0x1ff, + (self.0 >> 21) & 0x1FF, // [55:30] - (self.0 >> 30) & 0x3ffffff, + (self.0 >> 30) & 0x3FFFFFF, ] } diff --git a/kernel/src/task.rs b/kernel/src/task.rs index 4c603e16..59600652 100644 --- a/kernel/src/task.rs +++ b/kernel/src/task.rs @@ -1,26 +1,18 @@ #![allow(unused)] use { - alloc::{boxed::Box, collections::BTreeMap, sync::Arc, task::Wake}, + alloc::{boxed::Box, sync::Arc, task::Wake}, core::{ future::Future, pin::Pin, task::{Context, Poll, Waker}, }, crossbeam_queue::SegQueue, - kiam::when, + hashbrown::HashMap, slab::Slab, - spin::RwLock, + spin::Mutex, }; -static SPAWN_QUEUE: RwLock> = RwLock::new(None); -pub fn spawn(future: impl Future + Send + 'static) { - match &*SPAWN_QUEUE.read() { - Some(s) => s.push(Task::new(future)), - None => panic!("no task executor is running"), - } -} - pub fn yield_now() -> impl Future { struct YieldNow(bool); impl Future for YieldNow { @@ -42,61 +34,51 @@ pub fn yield_now() -> impl Future { #[derive(Default)] pub struct Executor { - tasks: Slab, - queue: TaskQueue, - to_spawn: SpawnQueue, - wakers: BTreeMap, + tasks: Slab, + queue: Arc>, + wakers: HashMap, // Keeping HashMap as it is more performant for lookups. } impl Executor { + pub fn new() -> Self { + Self { + tasks: Slab::new(), + queue: Arc::new(SegQueue::new()), + wakers: HashMap::new(), + } + } + pub fn spawn(&mut self, future: impl Future + Send + 'static) { - self.queue - .push(TaskId(self.tasks.insert(Task::new(future)))); + let task_id = TaskId(self.tasks.insert(Task::new(future))); + self.queue.push(task_id); } pub fn run(&mut self) { - { - let mut global_spawner = SPAWN_QUEUE.write(); - if global_spawner.is_some() { - panic!("Task executor is already running"); - } - - *global_spawner = Some(Arc::clone(&self.to_spawn)); - } - loop { - when! { - let Some(id) = self - .to_spawn - .pop() - .map(|t| TaskId(self.tasks.insert(t))) - .or_else(|| self.queue.pop()) - => { - let Some(task) = self.tasks.get_mut(id.0) else { - panic!("Attempted to get task from empty slot: {}", id.0); - }; - - let mut cx = Context::from_waker(self.wakers.entry(id).or_insert_with(|| { + while let Some(id) = self.queue.pop() { + if let Some(task) = self.tasks.get_mut(id.0) { + let waker = self.wakers.entry(id).or_insert_with(|| { Waker::from(Arc::new(TaskWaker { id, queue: Arc::clone(&self.queue), })) - })); + }); - match task.poll(&mut cx) { - Poll::Ready(()) => { - self.tasks.remove(id.0); - self.wakers.remove(&id); - } - Poll::Pending => (), + let mut cx = Context::from_waker(waker); + + if let Poll::Ready(()) = task.poll(&mut cx) { + self.tasks.remove(id.0); + self.wakers.remove(&id); } - }, - self.tasks.is_empty() => break, - _ => (), + } else { + panic!("Attempted to get task from empty slot: {}", id.0); + } + } + + if self.tasks.is_empty() { + break; } } - - *SPAWN_QUEUE.write() = None; } } @@ -117,21 +99,18 @@ impl Task { } } -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] +#[derive(Hash, Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] struct TaskId(usize); -type TaskQueue = Arc>; -type SpawnQueue = Arc>; - struct TaskWaker { id: TaskId, - queue: TaskQueue, + queue: Arc>, } impl Wake for TaskWaker { fn wake(self: Arc) { log::trace!("Woke Task-{:?}", self.id); - self.wake_by_ref(); + self.queue.push(self.id); } fn wake_by_ref(self: &Arc) { diff --git a/repbuild/Cargo.toml b/repbuild/Cargo.toml index c9c209ba..693031a7 100644 --- a/repbuild/Cargo.toml +++ b/repbuild/Cargo.toml @@ -4,15 +4,15 @@ version = "0.2.0" edition = "2021" [dependencies] -str-reader = "0.1.2" -derive_more = "0.99" -error-stack = "0.4" +str-reader = "0.1" +derive_more = { version = "1", features = ["full"] } +error-stack = "0.5" fatfs = "0.3" -toml = "0.5.2" +toml = "0.8" # hbasm.git = "https://git.ablecorp.us/AbleOS/holey-bytes.git" hblang.git = "https://git.ablecorp.us/AbleOS/holey-bytes.git" [dependencies.reqwest] -version = "0.11" +version = "0.12" default-features = false features = ["rustls-tls", "blocking"] diff --git a/repbuild/src/main.rs b/repbuild/src/main.rs index 3c7095f5..58f0451b 100644 --- a/repbuild/src/main.rs +++ b/repbuild/src/main.rs @@ -1,4 +1,5 @@ #![allow(unused)] + mod dev; use { @@ -7,7 +8,7 @@ use { error_stack::{bail, report, Context, Report, Result, ResultExt}, fatfs::{FileSystem, FormatVolumeOptions, FsOptions, ReadWriteSeek}, std::{ - fmt::Display, + // fmt::Display, fs::{self, File}, io::{self, Write}, path::Path, @@ -428,11 +429,11 @@ fn fetch_ovmf(target: Target) -> Result { #[derive(Debug, Display)] enum OvmfFetchError { - #[display(fmt = "Failed to fetch OVMF package")] + #[display("Failed to fetch OVMF package")] Fetch, - #[display(fmt = "No OVMF package available")] + #[display("No OVMF package available")] Empty, - #[display(fmt = "IO Error")] + #[display("IO Error")] Io, } @@ -447,19 +448,19 @@ enum Target { #[derive(Debug, Display)] enum Error { - #[display(fmt = "Failed to build the kernel")] + #[display("Failed to build the kernel")] Build, - #[display(fmt = "Missing or invalid subcommand (available: build, run)")] + #[display("Missing or invalid subcommand (available: build, run)")] InvalidSubCom, - #[display(fmt = "IO Error")] + #[display("IO Error")] Io, - #[display(fmt = "Failed to spawn a process")] + #[display("Failed to spawn a process")] ProcessSpawn, - #[display(fmt = "Failed to fetch UEFI firmware")] + #[display("Failed to fetch UEFI firmware")] OvmfFetch, - #[display(fmt = "Failed to assemble Holey Bytes code")] + #[display("Failed to assemble Holey Bytes code")] Assembler, - #[display(fmt = "QEMU Error: {}", "fmt_qemu_err(*_0)")] + #[display("QEMU Error: {}", "fmt_qemu_err(*_0)")] Qemu(Option), } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index b9ef17ea..d3900e74 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2024-05-17" +channel = "nightly-2024-07-17" components = ["rust-src", "llvm-tools"]