[−][src]Struct walrus::passes::Used
Finds the things within a module that are used.
This is useful for implementing something like a linker's --gc-sections
so
that our emitted .wasm
binaries are small and don't contain things that
are not used.
Fields
tables: HashSet<Id<Table>, BuildIdHasher>
The module's used tables.
types: HashSet<Id<Type>, BuildIdHasher>
The module's used types.
funcs: HashSet<Id<Function>, BuildIdHasher>
The module's used functions.
globals: HashSet<Id<Global>, BuildIdHasher>
The module's used globals.
memories: HashSet<Id<Memory>, BuildIdHasher>
The module's used memories.
elements: HashSet<Id<Element>, BuildIdHasher>
The module's used passive element segments.
data: HashSet<Id<Data>, BuildIdHasher>
The module's used passive data segments.
locals: HashMap<Id<Function>, HashSet<Id<Local>, BuildIdHasher>, BuildIdHasher>
Locals used within functions
Methods
impl Used
[src]
pub fn new<R>(module: &Module, roots: R) -> Used where
R: IntoIterator<Item = ExportId>,
[src]
R: IntoIterator<Item = ExportId>,
Construct a new Used
set for the given module.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,