From e3edda713f483249477a08c6152fe11a7e42c91a Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Fri, 27 Sep 2024 16:22:53 +0000 Subject: [PATCH 1/2] trivial: cargo update Update dependencies. This was mostly for clap. Signed-off-by: Dan Cross --- Cargo.lock | 156 ++++++++++++++++++++++++++--------------------------- 1 file changed, 78 insertions(+), 78 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a04cf64..4ef1e33 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,9 +13,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -28,33 +28,33 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys", @@ -74,9 +74,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bitstruct" @@ -100,9 +100,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.7" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" +checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" dependencies = [ "clap_builder", "clap_derive", @@ -110,9 +110,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.7" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" +checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" dependencies = [ "anstream", "anstyle", @@ -122,27 +122,27 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.5" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.77", ] [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "equivalent" @@ -164,9 +164,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "indexmap" -version = "2.2.6" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown", @@ -174,57 +174,57 @@ dependencies = [ [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "num_enum" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.77", ] [[package]] name = "port" version = "0.1.0" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -247,29 +247,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.203" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.77", ] [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -293,9 +293,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.66" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -304,15 +304,15 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.14" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "toml" -version = "0.8.14" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", @@ -322,18 +322,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.14" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap", "serde", @@ -344,9 +344,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "utf8parse" @@ -365,9 +365,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -381,57 +381,57 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.13" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] From 5632e5f65db9dcf1a8a3d54840c1b098f7d898c7 Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Fri, 27 Sep 2024 16:52:10 +0000 Subject: [PATCH 2/2] trivial: fix clippy lints Signed-off-by: Dan Cross --- aarch64/src/devcons.rs | 9 ++++++--- aarch64/src/mailbox.rs | 9 ++++++--- aarch64/src/main.rs | 1 + port/src/allocator.rs | 2 ++ port/src/fdt.rs | 4 +++- riscv64/Cargo.toml | 3 +++ riscv64/src/main.rs | 1 + riscv64/src/platform/virt/devcons.rs | 10 ++++++---- x86_64/src/devcons.rs | 4 ++-- x86_64/src/uart16550.rs | 2 +- xtask/src/config.rs | 2 -- 11 files changed, 31 insertions(+), 16 deletions(-) diff --git a/aarch64/src/devcons.rs b/aarch64/src/devcons.rs index 802b583..98ba463 100644 --- a/aarch64/src/devcons.rs +++ b/aarch64/src/devcons.rs @@ -2,6 +2,7 @@ use crate::param::KZERO; use crate::uartmini::MiniUart; +use core::cell::SyncUnsafeCell; use core::mem::MaybeUninit; use port::devcons::Console; use port::fdt::DeviceTree; @@ -36,10 +37,12 @@ pub fn init(dt: &DeviceTree) { let uart = MiniUart::new(dt, KZERO); uart.init(); - static mut UART: MaybeUninit = MaybeUninit::uninit(); + static UART: SyncUnsafeCell> = + SyncUnsafeCell::new(MaybeUninit::uninit()); unsafe { - UART.write(uart); - UART.assume_init_mut() + let cons = &mut *UART.get(); + cons.write(uart); + cons.assume_init_mut() } }); } diff --git a/aarch64/src/mailbox.rs b/aarch64/src/mailbox.rs index 0f0f794..11e651a 100644 --- a/aarch64/src/mailbox.rs +++ b/aarch64/src/mailbox.rs @@ -1,5 +1,6 @@ use crate::io::{read_reg, write_reg}; use crate::param::KZERO; +use core::cell::SyncUnsafeCell; use core::mem::MaybeUninit; use port::fdt::DeviceTree; use port::mcslock::{Lock, LockNode}; @@ -21,10 +22,12 @@ pub fn init(dt: &DeviceTree) { let node = LockNode::new(); let mut mailbox = MAILBOX.lock(&node); *mailbox = Some({ - static mut MAYBE_MAILBOX: MaybeUninit = MaybeUninit::uninit(); + static MAYBE_MAILBOX: SyncUnsafeCell> = + SyncUnsafeCell::new(MaybeUninit::uninit()); unsafe { - MAYBE_MAILBOX.write(Mailbox::new(dt, KZERO)); - MAYBE_MAILBOX.assume_init_mut() + let maybe_mailbox = &mut *MAYBE_MAILBOX.get(); + maybe_mailbox.write(Mailbox::new(dt, KZERO)); + maybe_mailbox.assume_init_mut() } }); } diff --git a/aarch64/src/main.rs b/aarch64/src/main.rs index 70f317e..f568900 100644 --- a/aarch64/src/main.rs +++ b/aarch64/src/main.rs @@ -5,6 +5,7 @@ #![feature(alloc_error_handler)] #![feature(core_intrinsics)] #![feature(strict_provenance)] +#![feature(sync_unsafe_cell)] #![forbid(unsafe_op_in_unsafe_fn)] mod devcons; diff --git a/port/src/allocator.rs b/port/src/allocator.rs index 494da14..445f301 100644 --- a/port/src/allocator.rs +++ b/port/src/allocator.rs @@ -5,6 +5,8 @@ // license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT. +#![allow(clippy::too_long_first_doc_paragraph)] + use alloc::alloc::{AllocError, Allocator, Layout}; use core::ptr::NonNull; use core::sync::atomic::{AtomicUsize, Ordering}; diff --git a/port/src/fdt.rs b/port/src/fdt.rs index 75773e1..0a9f4a4 100644 --- a/port/src/fdt.rs +++ b/port/src/fdt.rs @@ -1,3 +1,5 @@ +#![allow(clippy::too_long_first_doc_paragraph)] + use core::{ ffi::CStr, mem::{self, MaybeUninit}, @@ -173,7 +175,7 @@ impl<'a> DeviceTree<'a> { } let (start, end) = (value_i, value_i + 4); value_i = end; - return self.structs().get(start..end).and_then(bytes_to_u32); + self.structs().get(start..end).and_then(bytes_to_u32) }) } diff --git a/riscv64/Cargo.toml b/riscv64/Cargo.toml index 2ea5ad9..a2a6a1b 100644 --- a/riscv64/Cargo.toml +++ b/riscv64/Cargo.toml @@ -11,3 +11,6 @@ port = { path = "../port" } [features] opensbi = [] + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(platform, values("nezha"))', 'cfg(platform, values("virt"))'] } diff --git a/riscv64/src/main.rs b/riscv64/src/main.rs index 8551859..d569675 100644 --- a/riscv64/src/main.rs +++ b/riscv64/src/main.rs @@ -1,4 +1,5 @@ #![feature(alloc_error_handler)] +#![feature(sync_unsafe_cell)] #![cfg_attr(not(any(test)), no_std)] #![cfg_attr(not(test), no_main)] #![allow(clippy::upper_case_acronyms)] diff --git a/riscv64/src/platform/virt/devcons.rs b/riscv64/src/platform/virt/devcons.rs index 49f2e73..0a6cb36 100644 --- a/riscv64/src/platform/virt/devcons.rs +++ b/riscv64/src/platform/virt/devcons.rs @@ -1,5 +1,6 @@ // Racy to start. +use core::cell::SyncUnsafeCell; use core::mem::MaybeUninit; use crate::uart16550::Uart16550; @@ -17,11 +18,12 @@ pub fn init(dt: &DeviceTree) { let mut uart = Uart16550::new(ns16550a_reg); uart.init(115_200); - static mut UART: MaybeUninit = MaybeUninit::uninit(); - + static CONS: SyncUnsafeCell> = + SyncUnsafeCell::new(MaybeUninit::uninit()); unsafe { - UART.write(uart); - UART.assume_init_mut() + let cons = &mut *CONS.get(); + cons.write(uart); + cons.assume_init_mut() } }); } diff --git a/x86_64/src/devcons.rs b/x86_64/src/devcons.rs index b4c2781..6493411 100644 --- a/x86_64/src/devcons.rs +++ b/x86_64/src/devcons.rs @@ -15,7 +15,7 @@ impl Uart for Uart16550 { pub fn init() { Console::new(|| { - static UART: SyncUnsafeCell = SyncUnsafeCell::new(Uart16550 { port: 0x3f8 }); - unsafe { &mut *UART.get() } + static CONS: SyncUnsafeCell = SyncUnsafeCell::new(Uart16550 { port: 0x3f8 }); + unsafe { &mut *CONS.get() } }); } diff --git a/x86_64/src/uart16550.rs b/x86_64/src/uart16550.rs index fb177c5..ca657cf 100644 --- a/x86_64/src/uart16550.rs +++ b/x86_64/src/uart16550.rs @@ -1,4 +1,4 @@ -/// Simple UART driver to get setarted. +//! Simple UART driver to get started. pub fn putb(port: u16, b: u8) { unsafe { diff --git a/xtask/src/config.rs b/xtask/src/config.rs index 09539be..3c20841 100644 --- a/xtask/src/config.rs +++ b/xtask/src/config.rs @@ -46,8 +46,6 @@ pub struct Build { /// #[cfg(dev_foo = "baz")] /// pub mod foobaz; /// ``` - -/// config section #[derive(Debug, Serialize, Deserialize)] pub struct Config { pub dev: Option>,