[−][src]Struct walrus::ModuleConfig
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(&self) -> 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]
fn default() -> ModuleConfig
[src]
impl Debug for ModuleConfig
[src]
Auto Trait Implementations
impl Send for ModuleConfig
impl Sync for ModuleConfig
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
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
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,