Struct wasm_encoder::SymbolTable[][src]

pub struct SymbolTable { /* fields omitted */ }

A subsection of the linking custom section that provides extra information about the symbols present in this Wasm object file.

Implementations

impl SymbolTable[src]

pub fn new() -> Self[src]

Construct a new symbol table subsection encoder.

pub fn function(
    &mut self,
    flags: u32,
    index: u32,
    name: Option<&str>
) -> &mut Self
[src]

Define a function symbol in this symbol table.

The name must be omitted if index references an imported table and the WASM_SYM_EXPLICIT_NAME flag is not set.

pub fn global(
    &mut self,
    flags: u32,
    index: u32,
    name: Option<&str>
) -> &mut Self
[src]

Define a global symbol in this symbol table.

The name must be omitted if index references an imported table and the WASM_SYM_EXPLICIT_NAME flag is not set.

pub fn table(&mut self, flags: u32, index: u32, name: Option<&str>) -> &mut Self[src]

Define a table symbol in this symbol table.

The name must be omitted if index references an imported table and the WASM_SYM_EXPLICIT_NAME flag is not set.

pub fn data(
    &mut self,
    flags: u32,
    name: &str,
    definition: Option<DataSymbolDefinition>
) -> &mut Self
[src]

Add a data symbol to this symbol table.

impl SymbolTable[src]

pub const WASM_SYM_BINDING_WEAK: u32[src]

This is a weak symbol.

This flag is mutually exclusive with WASM_SYM_BINDING_LOCAL.

When linking multiple modules defining the same symbol, all weak definitions are discarded if any strong definitions exist; then if multiple weak definitions exist all but one (unspecified) are discarded; and finally it is an error if more than one definition remains.

pub const WASM_SYM_BINDING_LOCAL: u32[src]

This is a local symbol.

This flag is mutually exclusive with WASM_SYM_BINDING_WEAK.

Local symbols are not to be exported, or linked to other modules/sections. The names of all non-local symbols must be unique, but the names of local symbols are not considered for uniqueness. A local function or global symbol cannot reference an import.

pub const WASM_SYM_VISIBILITY_HIDDEN: u32[src]

This is a hidden symbol.

Hidden symbols are not to be exported when performing the final link, but may be linked to other modules.

pub const WASM_SYM_UNDEFINED: u32[src]

This symbol is not defined.

For non-data symbols, this must match whether the symbol is an import or is defined; for data symbols, determines whether a segment is specified.

pub const WASM_SYM_EXPORTED: u32[src]

This symbol is intended to be exported from the wasm module to the host environment.

This differs from the visibility flags in that it effects the static linker.

pub const WASM_SYM_EXPLICIT_NAME: u32[src]

This symbol uses an explicit symbol name, rather than reusing the name from a wasm import.

This allows it to remap imports from foreign WebAssembly modules into local symbols with different names.

pub const WASM_SYM_NO_STRIP: u32[src]

This symbol is intended to be included in the linker output, regardless of whether it is used by the program.

Trait Implementations

impl Clone for SymbolTable[src]

impl Debug for SymbolTable[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.