wasmtime/runtime/vm/gc/
enabled.rs

1//! Implementation of garbage collection and GC types in Wasmtime.
2
3mod arrayref;
4mod data;
5mod exnref;
6mod externref;
7#[cfg(feature = "gc-drc")]
8mod free_list;
9mod structref;
10
11pub use arrayref::*;
12pub use data::*;
13pub use exnref::*;
14pub use externref::*;
15pub use structref::*;
16
17#[cfg(feature = "gc-drc")]
18mod drc;
19#[cfg(feature = "gc-drc")]
20pub use drc::*;
21
22#[cfg(feature = "gc-null")]
23mod null;
24#[cfg(feature = "gc-null")]
25pub 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)]
32fn 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)]
40fn truncate_i32_to_i8(a: i32) -> i8 {
41    a as i8
42}