[−][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.
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<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,