pub struct CompileOptions {
pub import_map: Option<HashMap<String, ImportAction>>,
pub adapter: Option<String>,
pub metadata: Vec<u8>,
pub optimizations: OptimizationFlags,
pub max_memory_pages: Option<u32>,
}Expand description
Options for compilation.
Fields§
§import_map: Option<HashMap<String, ImportAction>>Mapping from import function names to actions.
When provided, all imports (except known intrinsics like host_call_N and pvm_ptr)
must have a mapping or compilation will fail with UnresolvedImport.
adapter: Option<String>WAT source for an adapter module whose exports replace matching main imports. Applied before the text-based import map, so the two compose.
metadata: Vec<u8>Metadata blob to prepend to the SPI output. Typically contains the source filename and compiler version.
optimizations: OptimizationFlagsOptimization flags controlling which compiler passes are enabled.
max_memory_pages: Option<u32>Override the maximum memory pages (memory.grow ceiling). When set, this takes precedence over both the WASM-declared max and the compiler default.
Trait Implementations§
Source§impl Clone for CompileOptions
impl Clone for CompileOptions
Source§fn clone(&self) -> CompileOptions
fn clone(&self) -> CompileOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompileOptions
impl Debug for CompileOptions
Source§impl Default for CompileOptions
impl Default for CompileOptions
Source§fn default() -> CompileOptions
fn default() -> CompileOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CompileOptions
impl RefUnwindSafe for CompileOptions
impl Send for CompileOptions
impl Sync for CompileOptions
impl Unpin for CompileOptions
impl UnsafeUnpin for CompileOptions
impl UnwindSafe for CompileOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more