pub struct SwarmConfig {
Show 46 fields pub allow_start_export: bool, pub available_imports: Option<Vec<u8>>, pub bulk_memory_enabled: bool, pub canonicalize_nans: bool, pub exceptions_enabled: bool, pub max_aliases: usize, pub max_components: usize, pub max_data_segments: usize, pub max_element_segments: usize, pub max_elements: usize, pub max_exports: usize, pub max_funcs: usize, pub max_globals: usize, pub max_imports: usize, pub max_instances: usize, pub max_instructions: usize, pub max_memories: usize, pub max_memory_pages: u64, pub max_modules: usize, pub max_nesting_depth: usize, pub max_tables: usize, pub max_tags: usize, pub max_type_size: u32, pub max_types: usize, pub max_values: usize, pub memory64_enabled: bool, pub memory_max_size_required: bool, pub memory_offset_choices: (u32, u32, u32), pub min_data_segments: usize, pub min_element_segments: usize, pub min_elements: usize, pub min_exports: usize, pub min_funcs: usize, pub min_globals: usize, pub min_imports: usize, pub min_memories: u32, pub min_tables: u32, pub min_tags: usize, pub min_types: usize, pub min_uleb_size: u8, pub multi_value_enabled: bool, pub reference_types_enabled: bool, pub relaxed_simd_enabled: bool, pub saturating_float_to_int_enabled: bool, pub sign_extension_enabled: bool, pub simd_enabled: bool,
}
Expand description

A module configuration that uses swarm testing.

Dynamically – but still deterministically, via its Arbitrary implementation – chooses configuration options.

Note that we pick only maximums, not minimums, here because it is more complex to describe the domain of valid configs when minima are involved (min <= max for each variable) and minima are mostly used to ensure certain elements are present, but do not widen the range of generated Wasm modules.

Fields

allow_start_export: boolavailable_imports: Option<Vec<u8>>bulk_memory_enabled: boolcanonicalize_nans: boolexceptions_enabled: boolmax_aliases: usizemax_components: usizemax_data_segments: usizemax_element_segments: usizemax_elements: usizemax_exports: usizemax_funcs: usizemax_globals: usizemax_imports: usizemax_instances: usizemax_instructions: usizemax_memories: usizemax_memory_pages: u64max_modules: usizemax_nesting_depth: usizemax_tables: usizemax_tags: usizemax_type_size: u32max_types: usizemax_values: usizememory64_enabled: boolmemory_max_size_required: boolmemory_offset_choices: (u32, u32, u32)min_data_segments: usizemin_element_segments: usizemin_elements: usizemin_exports: usizemin_funcs: usizemin_globals: usizemin_imports: usizemin_memories: u32min_tables: u32min_tags: usizemin_types: usizemin_uleb_size: u8multi_value_enabled: boolreference_types_enabled: boolrelaxed_simd_enabled: boolsaturating_float_to_int_enabled: boolsign_extension_enabled: boolsimd_enabled: bool

Trait Implementations

Generate an arbitrary value of Self from the given unstructured data. Read more

Generate an arbitrary value of Self from the entirety of the given unstructured data. Read more

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

The minimum number of types to generate. Defaults to 0.

The maximum number of types to generate. Defaults to 100.

The minimum number of imports to generate. Defaults to 0. Read more

The maximum number of imports to generate. Defaults to 100.

The imports that may be used when generating the module. Read more

The minimum number of functions to generate. Defaults to 0. This includes imported functions. Read more

The maximum number of functions to generate. Defaults to 100. This includes imported functions. Read more

The minimum number of globals to generate. Defaults to 0. This includes imported globals. Read more

The maximum number of globals to generate. Defaults to 100. This includes imported globals. Read more

The minimum number of exports to generate. Defaults to 0.

The maximum number of exports to generate. Defaults to 100.

The minimum number of element segments to generate. Defaults to 0.

The maximum number of element segments to generate. Defaults to 100.

The minimum number of elements within a segment to generate. Defaults to 0. Read more

The maximum number of elements within a segment to generate. Defaults to 100. Read more

The minimum number of data segments to generate. Defaults to 0.

The maximum number of data segments to generate. Defaults to 100.

The maximum number of instructions to generate in a function body. Defaults to 100. Read more

The minimum number of memories to use. Defaults to 0. This includes imported memories. Read more

The maximum number of memories to use. Defaults to 1. This includes imported memories. Read more

The minimum number of tables to use. Defaults to 0. This includes imported tables. Read more

The maximum number of tables to use. Defaults to 1. This includes imported tables. Read more

The maximum, in 64k Wasm pages, of any memory’s initial or maximum size. Read more

Whether every Wasm memory must have a maximum size specified. Defaults to false. Read more

The maximum number of instances to use. Defaults to 10. This includes imported instances. Read more

The maximum number of modules to use. Defaults to 10. This includes imported modules. Read more

Control the probability of generating memory offsets that are in bounds vs. potentially out of bounds. Read more

The minimum size, in bytes, of all leb-encoded integers. Defaults to 1. Read more

Determines whether the bulk memory proposal is enabled for generating instructions. Read more

Determines whether the reference types proposal is enabled for generating instructions. Read more

Determines whether the SIMD proposal is enabled for generating instructions. Read more

Determines whether the Relaxed SIMD proposal is enabled for generating instructions. Read more

Determines whether the exception-handling proposal is enabled for generating instructions. Read more

Determines whether the multi-value results are enabled. Read more

Determines whether the nontrapping-float-to-int-conversions propsal is enabled. Read more

Determines whether the sign-extension-ops propsal is enabled. Read more

Determines whether a start export may be included. Defaults to true.

Returns the maximal size of the alias section.

Returns the maximal nesting depth of modules with the module linking proposal. Read more

Returns the maximal effective size of any type generated by wasm-smith. Read more

Returns whether 64-bit memories are allowed. Read more

Returns whether NaN values are canonicalized after all f32/f64 operation. Read more

The minimum number of tags to generate. Defaults to 0.

The maximum number of tags to generate. Defaults to 100.

The maximum number of components to use. Defaults to 10. This includes imported components. Read more

The maximum number of values to use. Defaults to 10. This includes imported values. Read more

Returns the kinds of instructions allowed in the generated wasm programs. Read more

Returns whether we should generate custom sections or not. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.