Struct marine::generic::MarineModuleConfig
source · pub struct MarineModuleConfig<WB: WasmBackend> {
pub mem_pages_count: Option<u32>,
pub max_heap_size: Option<u64>,
pub logger_enabled: bool,
pub host_imports: HashMap<String, HostImportDescriptor<WB>>,
pub wasi: Option<MarineWASIConfig>,
pub logging_mask: i32,
}Expand description
Various settings that could be used to guide Marine how to load a module in a proper way.
Fields§
§mem_pages_count: Option<u32>Maximum memory size accessible by a module in Wasm pages (64 Kb).
max_heap_size: Option<u64>Maximum memory size for heap of Wasm module in bytes, if it set, mem_pages_count ignored.
logger_enabled: boolDefines whether Marine should provide a special host log_utf8_string function for this module.
host_imports: HashMap<String, HostImportDescriptor<WB>>Export from host functions that will be accessible on the Wasm side by provided name.
wasi: Option<MarineWASIConfig>A WASI config.
logging_mask: i32Mask used to filter logs, for details see log_utf8_string
Implementations§
source§impl<WB: WasmBackend> MarineModuleConfig<WB>
impl<WB: WasmBackend> MarineModuleConfig<WB>
Trait Implementations§
source§impl<WB: Default + WasmBackend> Default for MarineModuleConfig<WB>
impl<WB: Default + WasmBackend> Default for MarineModuleConfig<WB>
source§fn default() -> MarineModuleConfig<WB>
fn default() -> MarineModuleConfig<WB>
Returns the “default value” for a type. Read more
source§impl<'c, WB: WasmBackend> TryFrom<WithContext<'c, TomlMarineModuleConfig>> for MarineModuleConfig<WB>
impl<'c, WB: WasmBackend> TryFrom<WithContext<'c, TomlMarineModuleConfig>> for MarineModuleConfig<WB>
§type Error = MarineError
type Error = MarineError
The type returned in the event of a conversion error.
source§fn try_from(
toml_config: WithContext<'c, TomlMarineModuleConfig>
) -> Result<Self, Self::Error>
fn try_from( toml_config: WithContext<'c, TomlMarineModuleConfig> ) -> Result<Self, Self::Error>
Performs the conversion.
Auto Trait Implementations§
impl<WB> !RefUnwindSafe for MarineModuleConfig<WB>
impl<WB> Send for MarineModuleConfig<WB>
impl<WB> Sync for MarineModuleConfig<WB>
impl<WB> Unpin for MarineModuleConfig<WB>
impl<WB> !UnwindSafe for MarineModuleConfig<WB>
Blanket Implementations§
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where T: AsFilelike,
Query the “status” flags for the
self file descriptor.