1 //! Implementation of garbage collection and GC types in Wasmtime. 2 3 mod arrayref; 4 mod data; 5 mod exnref; 6 mod externref; 7 #[cfg(feature = "gc-drc")] 8 mod free_list; 9 mod structref; 10 11 pub use arrayref::*; 12 pub use data::*; 13 pub use exnref::*; 14 pub use externref::*; 15 pub use structref::*; 16 17 #[cfg(feature = "gc-drc")] 18 mod drc; 19 #[cfg(feature = "gc-drc")] 20 pub use drc::*; 21 22 #[cfg(feature = "gc-null")] 23 mod null; 24 #[cfg(feature = "gc-null")] 25 pub use null::*; 26 27 // Explicit methods to clearly indicate that truncation is desired when used. 28 #[expect( 29 clippy::cast_possible_truncation, 30 reason = "that's the purpose of this method" 31 )] 32 fn truncate_i32_to_i16(a: i32) -> i16 { 33 a as i16 34 } 35 36 #[expect( 37 clippy::cast_possible_truncation, 38 reason = "that's the purpose of this method" 39 )] 40 fn truncate_i32_to_i8(a: i32) -> i8 { 41 a as i8 42 } 43