[][src]Struct walrus::ModuleConfig

pub struct ModuleConfig { /* fields omitted */ }

Configuration for a Module which currently affects parsing.

Methods

impl ModuleConfig[src]

pub fn new() -> ModuleConfig[src]

Creates a fresh new configuration with default settings.

pub fn generate_names(&mut self, generate: bool) -> &mut ModuleConfig[src]

Sets a flag to whether debugging names are generated for locals/functions/etc when parsing and running passes for this module.

By default this flag is false, and it will generate quite a few names if enabled!

pub fn strict_validate(&mut self, strict: bool) -> &mut ModuleConfig[src]

Indicates whether the module, after parsing, performs strict validation of the wasm module to adhere with the current version of the wasm specification.

This can be expensive for some modules and strictly isn't required to create a Module from a wasm file. This includes checks such as "atomic instructions require a shared memory".

By default this flag is true

pub fn parse(&mut self, wasm: &[u8]) -> Result<Module>[src]

Parses an in-memroy WebAssembly file into a Module using this configuration.

Trait Implementations

impl Clone for ModuleConfig[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for ModuleConfig[src]

impl Debug for ModuleConfig[src]

Auto Trait Implementations

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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.

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

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