diff --git a/agb/Cargo.toml b/agb/Cargo.toml index d015d115..4027a4f9 100644 --- a/agb/Cargo.toml +++ b/agb/Cargo.toml @@ -19,7 +19,7 @@ agb_macros = { version = "0.15.0", path = "../agb-macros" } agb_fixnum = { version = "0.15.0", path = "../agb-fixnum" } agb_hashmap = { version = "0.15.0", path = "../agb-hashmap" } bare-metal = "1" -modular-bitfield = "0.11" +bilge = "0.1" rustc-hash = { version = "1", default-features = false } [package.metadata.docs.rs] diff --git a/agb/src/display/mod.rs b/agb/src/display/mod.rs index e91ac9d6..76d9e5a8 100644 --- a/agb/src/display/mod.rs +++ b/agb/src/display/mod.rs @@ -1,7 +1,8 @@ use crate::memory_mapped::MemoryMapped; + +use bilge::prelude::*; use bitflags::bitflags; -use modular_bitfield::BitfieldSpecifier; use video::Video; use self::{ @@ -159,7 +160,8 @@ pub fn busy_wait_for_vblank() { while VCOUNT.get() < 160 {} } -#[derive(BitfieldSpecifier, Clone, Copy, Debug)] +#[bitsize(2)] +#[derive(FromBits, PartialEq, Eq, Clone, Copy, Debug)] pub enum Priority { P0 = 0, P1 = 1, diff --git a/agb/src/display/object/unmanaged/attributes.rs b/agb/src/display/object/unmanaged/attributes.rs index 2ae0d948..634e4760 100644 --- a/agb/src/display/object/unmanaged/attributes.rs +++ b/agb/src/display/object/unmanaged/attributes.rs @@ -1,4 +1,4 @@ -use modular_bitfield::BitfieldSpecifier; +use bilge::prelude::*; use crate::display::Priority; @@ -17,7 +17,14 @@ pub struct Attributes { impl Default for Attributes { fn default() -> Self { Self { - a0: ObjectAttribute0::from_bytes([0, 0b10]), + a0: ObjectAttribute0::new( + 0, + ObjectMode::Normal, + GraphicsMode::Normal, + false, + ColourMode::Four, + u2::new(1), + ), a1s: Default::default(), a1a: Default::default(), a2: Default::default(), @@ -37,20 +44,12 @@ pub enum AffineMode { impl Attributes { pub fn write(self, ptr: *mut u16) { let mode = self.a0.object_mode(); - unsafe { - let attrs = core::mem::transmute::<_, [u16; 3]>(match mode { - ObjectMode::Normal => [ - self.a0.into_bytes(), - self.a1s.into_bytes(), - self.a2.into_bytes(), - ], - _ => [ - self.a0.into_bytes(), - self.a1a.into_bytes(), - self.a2.into_bytes(), - ], - }); + let attrs = match mode { + ObjectMode::Normal => [self.a0.into(), self.a1s.into(), self.a2.into()], + _ => [self.a0.into(), self.a1a.into(), self.a2.into()], + }; + unsafe { ptr.add(0).write_volatile(attrs[0]); ptr.add(1).write_volatile(attrs[1]); ptr.add(2).write_volatile(attrs[2]); @@ -89,8 +88,8 @@ impl Attributes { } pub fn set_x(&mut self, x: u16) -> &mut Self { - self.a1a.set_x(x.rem_euclid(1 << 9)); - self.a1s.set_x(x.rem_euclid(1 << 9)); + self.a1a.set_x(u9::new(x.rem_euclid(1 << 9))); + self.a1s.set_x(u9::new(x.rem_euclid(1 << 9))); self } @@ -114,28 +113,29 @@ impl Attributes { } pub fn set_palette(&mut self, palette_id: u16) -> &mut Self { - self.a2.set_palette_bank(palette_id as u8); + self.a2.set_palette_bank(u4::new(palette_id as u8)); self } pub fn set_affine_matrix(&mut self, affine_matrix_id: u16) -> &mut Self { - self.a1a.set_affine_index(affine_matrix_id as u8); + self.a1a.set_affine_index(u5::new(affine_matrix_id as u8)); self } pub fn set_sprite(&mut self, sprite_id: u16, shape: u16, size: u16) -> &mut Self { - self.a2.set_tile_index(sprite_id); - self.a1a.set_size(size as u8); - self.a1s.set_size(size as u8); - self.a0.set_shape(shape as u8); + self.a2.set_tile_index(u10::new(sprite_id)); + self.a1a.set_size(u2::new(size as u8)); + self.a1s.set_size(u2::new(size as u8)); + self.a0.set_shape(u2::new(shape as u8)); self } } -#[derive(BitfieldSpecifier, Clone, Copy, Debug, PartialEq, Eq)] +#[bitsize(2)] +#[derive(FromBits, Clone, Copy, Debug, PartialEq, Eq)] enum ObjectMode { Normal, Affine, @@ -143,15 +143,16 @@ enum ObjectMode { AffineDouble, } -#[derive(BitfieldSpecifier, Clone, Copy, Debug, PartialEq, Eq)] -#[bits = 2] +#[bitsize(2)] +#[derive(TryFromBits, Clone, Copy, Debug, PartialEq, Eq)] enum GraphicsMode { Normal, AlphaBlending, Window, } -#[derive(BitfieldSpecifier, Clone, Copy, Debug, PartialEq, Eq)] +#[bitsize(1)] +#[derive(FromBits, Clone, Copy, Debug, PartialEq, Eq)] enum ColourMode { Four, Eight, @@ -162,49 +163,44 @@ enum ColourMode { #[allow(clippy::all)] #[allow(clippy::map_unwrap_or)] mod attributes { - use modular_bitfield::{ - bitfield, - specifiers::{B10, B2, B3, B4, B5, B8, B9}, - }; - use crate::display::Priority; use super::*; - #[bitfield] - #[derive(Clone, Copy, PartialEq, Eq, Debug, Default)] + + #[bitsize(16)] + #[derive(TryFromBits, Clone, Copy, PartialEq, Eq, DebugBits, Default)] pub(super) struct ObjectAttribute0 { - pub y: B8, + pub y: u8, pub object_mode: ObjectMode, pub graphics_mode: GraphicsMode, pub mosaic: bool, pub colour_mode: ColourMode, - pub shape: B2, + pub shape: u2, } - #[bitfield] - #[derive(Clone, Copy, PartialEq, Eq, Debug, Default)] + #[bitsize(16)] + #[derive(FromBits, Clone, Copy, PartialEq, Eq, DebugBits, Default)] pub(super) struct ObjectAttribute1Standard { - pub x: B9, - #[skip] - __: B3, + pub x: u9, + __: u3, pub horizontal_flip: bool, pub vertical_flip: bool, - pub size: B2, + pub size: u2, } - #[bitfield] - #[derive(Clone, Copy, PartialEq, Eq, Debug, Default)] + #[bitsize(16)] + #[derive(FromBits, Clone, Copy, PartialEq, Eq, DebugBits, Default)] pub(super) struct ObjectAttribute1Affine { - pub x: B9, - pub affine_index: B5, - pub size: B2, + pub x: u9, + pub affine_index: u5, + pub size: u2, } - #[bitfield] - #[derive(Clone, Copy, PartialEq, Eq, Debug, Default)] + #[bitsize(16)] + #[derive(FromBits, Clone, Copy, PartialEq, Eq, DebugBits, Default)] pub(super) struct ObjectAttribute2 { - pub tile_index: B10, + pub tile_index: u10, pub priority: Priority, - pub palette_bank: B4, + pub palette_bank: u4, } } diff --git a/book/games/pong/Cargo.lock b/book/games/pong/Cargo.lock index 307eefe0..58d53b82 100644 --- a/book/games/pong/Cargo.lock +++ b/book/games/pong/Cargo.lock @@ -24,8 +24,8 @@ dependencies = [ "agb_macros", "agb_sound_converter", "bare-metal", + "bilge", "bitflags 2.1.0", - "modular-bitfield", "rustc-hash", ] @@ -52,7 +52,7 @@ dependencies = [ "image", "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -61,7 +61,7 @@ version = "0.15.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -71,7 +71,7 @@ dependencies = [ "hound", "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -85,6 +85,12 @@ dependencies = [ "version_check", ] +[[package]] +name = "arbitrary-int" +version = "1.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a49f791c7c8885e8221d31bc3a34455b0fd869810d8ddff608dbe08a598f9d9" + [[package]] name = "asefile" version = "0.3.5" @@ -111,6 +117,28 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" +[[package]] +name = "bilge" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c97ac126908e16a5347eb83d7439c6638e22f026f852a3565ac4d91b02a7762b" +dependencies = [ + "arbitrary-int", + "bilge-impl", +] + +[[package]] +name = "bilge-impl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e5c47aa8db64c22c688a5ca26abbfe537fda96c4da3fcc6d7abe8cc12bc40a" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -243,27 +271,6 @@ dependencies = [ "adler", ] -[[package]] -name = "modular-bitfield" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a53d79ba8304ac1c4f9eb3b9d281f21f7be9d4626f72ce7df4ad8fbde4f38a74" -dependencies = [ - "modular-bitfield-impl", - "static_assertions", -] - -[[package]] -name = "modular-bitfield-impl" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "nohash" version = "0.2.0" @@ -336,6 +343,29 @@ dependencies = [ "agb", ] +[[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", + "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.56" @@ -360,23 +390,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[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.15" diff --git a/examples/amplitude/Cargo.lock b/examples/amplitude/Cargo.lock index 9e446c27..fd72895d 100644 --- a/examples/amplitude/Cargo.lock +++ b/examples/amplitude/Cargo.lock @@ -24,8 +24,8 @@ dependencies = [ "agb_macros", "agb_sound_converter", "bare-metal", + "bilge", "bitflags 2.1.0", - "modular-bitfield", "rustc-hash", ] @@ -52,7 +52,7 @@ dependencies = [ "image", "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -61,7 +61,7 @@ version = "0.15.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -71,7 +71,7 @@ dependencies = [ "hound", "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -92,6 +92,12 @@ dependencies = [ "agb", ] +[[package]] +name = "arbitrary-int" +version = "1.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a49f791c7c8885e8221d31bc3a34455b0fd869810d8ddff608dbe08a598f9d9" + [[package]] name = "asefile" version = "0.3.5" @@ -118,6 +124,28 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" +[[package]] +name = "bilge" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c97ac126908e16a5347eb83d7439c6638e22f026f852a3565ac4d91b02a7762b" +dependencies = [ + "arbitrary-int", + "bilge-impl", +] + +[[package]] +name = "bilge-impl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e5c47aa8db64c22c688a5ca26abbfe537fda96c4da3fcc6d7abe8cc12bc40a" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -250,27 +278,6 @@ dependencies = [ "adler", ] -[[package]] -name = "modular-bitfield" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a53d79ba8304ac1c4f9eb3b9d281f21f7be9d4626f72ce7df4ad8fbde4f38a74" -dependencies = [ - "modular-bitfield-impl", - "static_assertions", -] - -[[package]] -name = "modular-bitfield-impl" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "nohash" version = "0.2.0" @@ -336,6 +343,29 @@ dependencies = [ "miniz_oxide 0.3.7", ] +[[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", + "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.56" @@ -360,23 +390,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[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.15" diff --git a/examples/combo/Cargo.lock b/examples/combo/Cargo.lock index 872b5a80..924becd4 100644 --- a/examples/combo/Cargo.lock +++ b/examples/combo/Cargo.lock @@ -24,8 +24,8 @@ dependencies = [ "agb_macros", "agb_sound_converter", "bare-metal", + "bilge", "bitflags 2.1.0", - "modular-bitfield", "rustc-hash", ] @@ -52,7 +52,7 @@ dependencies = [ "image", "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -61,7 +61,7 @@ version = "0.15.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -71,7 +71,7 @@ dependencies = [ "hound", "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -92,6 +92,12 @@ dependencies = [ "agb", ] +[[package]] +name = "arbitrary-int" +version = "1.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a49f791c7c8885e8221d31bc3a34455b0fd869810d8ddff608dbe08a598f9d9" + [[package]] name = "asefile" version = "0.3.5" @@ -127,6 +133,28 @@ dependencies = [ "byteorder", ] +[[package]] +name = "bilge" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c97ac126908e16a5347eb83d7439c6638e22f026f852a3565ac4d91b02a7762b" +dependencies = [ + "arbitrary-int", + "bilge-impl", +] + +[[package]] +name = "bilge-impl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e5c47aa8db64c22c688a5ca26abbfe537fda96c4da3fcc6d7abe8cc12bc40a" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -310,27 +338,6 @@ dependencies = [ "adler", ] -[[package]] -name = "modular-bitfield" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a53d79ba8304ac1c4f9eb3b9d281f21f7be9d4626f72ce7df4ad8fbde4f38a74" -dependencies = [ - "modular-bitfield-impl", - "static_assertions", -] - -[[package]] -name = "modular-bitfield-impl" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "nohash" version = "0.2.0" @@ -396,6 +403,29 @@ dependencies = [ "miniz_oxide 0.3.7", ] +[[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", + "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.56" @@ -449,7 +479,7 @@ checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -463,23 +493,6 @@ dependencies = [ "serde", ] -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[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.15" diff --git a/examples/hyperspace-roll/Cargo.lock b/examples/hyperspace-roll/Cargo.lock index 4f4b46e4..90cf00b6 100644 --- a/examples/hyperspace-roll/Cargo.lock +++ b/examples/hyperspace-roll/Cargo.lock @@ -24,8 +24,8 @@ dependencies = [ "agb_macros", "agb_sound_converter", "bare-metal", + "bilge", "bitflags 2.1.0", - "modular-bitfield", "rustc-hash", ] @@ -52,7 +52,7 @@ dependencies = [ "image", "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -61,7 +61,7 @@ version = "0.15.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -71,7 +71,7 @@ dependencies = [ "hound", "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -85,6 +85,12 @@ dependencies = [ "version_check", ] +[[package]] +name = "arbitrary-int" +version = "1.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a49f791c7c8885e8221d31bc3a34455b0fd869810d8ddff608dbe08a598f9d9" + [[package]] name = "asefile" version = "0.3.5" @@ -111,6 +117,28 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" +[[package]] +name = "bilge" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c97ac126908e16a5347eb83d7439c6638e22f026f852a3565ac4d91b02a7762b" +dependencies = [ + "arbitrary-int", + "bilge-impl", +] + +[[package]] +name = "bilge-impl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e5c47aa8db64c22c688a5ca26abbfe537fda96c4da3fcc6d7abe8cc12bc40a" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -250,27 +278,6 @@ dependencies = [ "adler", ] -[[package]] -name = "modular-bitfield" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a53d79ba8304ac1c4f9eb3b9d281f21f7be9d4626f72ce7df4ad8fbde4f38a74" -dependencies = [ - "modular-bitfield-impl", - "static_assertions", -] - -[[package]] -name = "modular-bitfield-impl" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "nohash" version = "0.2.0" @@ -336,6 +343,29 @@ dependencies = [ "miniz_oxide 0.3.7", ] +[[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", + "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.56" @@ -360,23 +390,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[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.15" diff --git a/examples/the-hat-chooses-the-wizard/Cargo.lock b/examples/the-hat-chooses-the-wizard/Cargo.lock index fe336dec..d59342aa 100644 --- a/examples/the-hat-chooses-the-wizard/Cargo.lock +++ b/examples/the-hat-chooses-the-wizard/Cargo.lock @@ -24,8 +24,8 @@ dependencies = [ "agb_macros", "agb_sound_converter", "bare-metal", + "bilge", "bitflags 2.1.0", - "modular-bitfield", "rustc-hash", ] @@ -52,7 +52,7 @@ dependencies = [ "image", "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -61,7 +61,7 @@ version = "0.15.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -71,7 +71,7 @@ dependencies = [ "hound", "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -85,6 +85,12 @@ dependencies = [ "version_check", ] +[[package]] +name = "arbitrary-int" +version = "1.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a49f791c7c8885e8221d31bc3a34455b0fd869810d8ddff608dbe08a598f9d9" + [[package]] name = "asefile" version = "0.3.5" @@ -111,6 +117,28 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" +[[package]] +name = "bilge" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c97ac126908e16a5347eb83d7439c6638e22f026f852a3565ac4d91b02a7762b" +dependencies = [ + "arbitrary-int", + "bilge-impl", +] + +[[package]] +name = "bilge-impl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e5c47aa8db64c22c688a5ca26abbfe537fda96c4da3fcc6d7abe8cc12bc40a" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -249,27 +277,6 @@ dependencies = [ "adler", ] -[[package]] -name = "modular-bitfield" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a53d79ba8304ac1c4f9eb3b9d281f21f7be9d4626f72ce7df4ad8fbde4f38a74" -dependencies = [ - "modular-bitfield-impl", - "static_assertions", -] - -[[package]] -name = "modular-bitfield-impl" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "nohash" version = "0.2.0" @@ -335,6 +342,29 @@ dependencies = [ "miniz_oxide 0.3.7", ] +[[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", + "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.56" @@ -382,7 +412,7 @@ checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -396,23 +426,6 @@ dependencies = [ "serde", ] -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[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.15" diff --git a/examples/the-purple-night/Cargo.lock b/examples/the-purple-night/Cargo.lock index 51267c67..3fafe335 100644 --- a/examples/the-purple-night/Cargo.lock +++ b/examples/the-purple-night/Cargo.lock @@ -24,8 +24,8 @@ dependencies = [ "agb_macros", "agb_sound_converter", "bare-metal", + "bilge", "bitflags 2.1.0", - "modular-bitfield", "rustc-hash", ] @@ -52,7 +52,7 @@ dependencies = [ "image", "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -61,7 +61,7 @@ version = "0.15.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -71,7 +71,7 @@ dependencies = [ "hound", "proc-macro2", "quote", - "syn 2.0.15", + "syn", ] [[package]] @@ -85,6 +85,12 @@ dependencies = [ "version_check", ] +[[package]] +name = "arbitrary-int" +version = "1.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a49f791c7c8885e8221d31bc3a34455b0fd869810d8ddff608dbe08a598f9d9" + [[package]] name = "asefile" version = "0.3.5" @@ -120,6 +126,28 @@ dependencies = [ "byteorder", ] +[[package]] +name = "bilge" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c97ac126908e16a5347eb83d7439c6638e22f026f852a3565ac4d91b02a7762b" +dependencies = [ + "arbitrary-int", + "bilge-impl", +] + +[[package]] +name = "bilge-impl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e5c47aa8db64c22c688a5ca26abbfe537fda96c4da3fcc6d7abe8cc12bc40a" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -279,27 +307,6 @@ dependencies = [ "adler", ] -[[package]] -name = "modular-bitfield" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a53d79ba8304ac1c4f9eb3b9d281f21f7be9d4626f72ce7df4ad8fbde4f38a74" -dependencies = [ - "modular-bitfield-impl", - "static_assertions", -] - -[[package]] -name = "modular-bitfield-impl" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "nohash" version = "0.2.0" @@ -365,6 +372,29 @@ dependencies = [ "miniz_oxide 0.3.7", ] +[[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", + "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.56" @@ -395,23 +425,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[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.15"