pub struct TryNewCodeConfig {Show 13 fields
pub version: u32,
pub stack_height: Option<u32>,
pub data_segments_amount_limit: Option<u32>,
pub table_number_limit: Option<u32>,
pub export_stack_height: bool,
pub check_exports: bool,
pub check_imports: bool,
pub check_and_canonize_stack_end: bool,
pub check_mut_global_exports: bool,
pub check_start_section: bool,
pub check_data_section: bool,
pub check_table_section: bool,
pub make_validation: bool,
}
Expand description
Configuration for Code::try_new_mock_
.
By default all checks enabled.
Fields§
§version: u32
Instrumentation version
stack_height: Option<u32>
Stack height limit
data_segments_amount_limit: Option<u32>
Limit of data section amount
table_number_limit: Option<u32>
Limit on the number of tables.
export_stack_height: bool
Export STACK_HEIGHT_EXPORT_NAME
global
check_exports: bool
Check exports (wasm contains init or handle exports)
check_imports: bool
Check imports (check that all imports are valid syscalls with correct signature)
check_and_canonize_stack_end: bool
Check and canonize stack end
check_mut_global_exports: bool
Check mutable global exports
check_start_section: bool
Check start section (not allowed for programs)
check_data_section: bool
Check data section
check_table_section: bool
Check table section
make_validation: bool
Make wasmparser validation
Implementations§
Source§impl TryNewCodeConfig
impl TryNewCodeConfig
Sourcepub fn new_no_exports_check() -> Self
pub fn new_no_exports_check() -> Self
New default config without exports checks.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TryNewCodeConfig
impl RefUnwindSafe for TryNewCodeConfig
impl Send for TryNewCodeConfig
impl Sync for TryNewCodeConfig
impl Unpin for TryNewCodeConfig
impl UnwindSafe for TryNewCodeConfig
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