diff --git a/Cargo.lock b/Cargo.lock index 65b4c95..f17cdbb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -571,7 +571,18 @@ version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" dependencies = [ - "bytecheck_derive", + "bytecheck_derive 0.6.11", + "ptr_meta", + "simdutf8", +] + +[[package]] +name = "bytecheck" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41502630fe304ce54cbb2f8389e017784dee2b0328147779fcbe43b9db06d35d" +dependencies = [ + "bytecheck_derive 0.7.0", "ptr_meta", "simdutf8", ] @@ -587,6 +598,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "bytecheck_derive" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda88c587085bc07dc201ab9df871bd9baa5e07f7754b745e4d7194b43ac1eda" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "bytemuck" version = "1.13.1" @@ -905,6 +927,7 @@ dependencies = [ name = "cuttle" version = "0.1.0" dependencies = [ + "bytecheck 0.7.0", "clap", "eframe", "egui_extras", @@ -2513,7 +2536,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "581008d2099240d37fb08d77ad713bcaec2c4d89d50b5b21a8bb1996bbab68ab" dependencies = [ - "bytecheck", + "bytecheck 0.6.11", ] [[package]] @@ -2557,7 +2580,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0200c8230b013893c0b2d6213d6ec64ed2b9be2e0e016682b7224ff82cff5c58" dependencies = [ "bitvec", - "bytecheck", + "bytecheck 0.6.11", "hashbrown 0.12.3", "ptr_meta", "rend", diff --git a/Cargo.toml b/Cargo.toml index 1429058..40ef073 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ default = ["desktop"] desktop = ["dep:clap", "dep:eframe", "dep:egui_extras", "dep:fast_qr", "dep:png"] [dependencies] +bytecheck = "0.7" clap = { version = "4.3", optional = true, features = ["derive", "env"] } eframe = { version = "0.22", default-features = false, optional = true, features = ["default_fonts", "wgpu", "tts", "accesskit"] } egui_extras = { version = "0.22", default-features = false, optional = true, features = ["chrono", "image"] } diff --git a/src/lib.rs b/src/lib.rs index 9b09046..d413ad9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -70,7 +70,7 @@ pub enum StreamStatus { } #[derive(Debug, Clone, PartialEq, Eq, Archive, Serialize, Deserialize)] -#[repr(C)] +#[archive(check_bytes)] pub struct TxConfig { pub len: u64, pub mtu: u16,