pub struct RuntimeOptions {Show 13 fields
singlepass: bool,
cranelift: bool,
llvm: bool,
experimental_artifact: bool,
enable_verifier: bool,
pub(crate) compiler_debug_dir: Option<PathBuf>,
profiler: Option<Profiler>,
_enable_pass_params_opt: bool,
compiler_threads: Option<NonZero<usize>>,
enable_nan_canonicalization: bool,
disable_non_volatile_memops: bool,
enable_experimental_unaligned_memory_accesses: bool,
features: WasmFeatures,
}Expand description
The compiler options
Fields§
§singlepass: boolUse Singlepass compiler.
cranelift: boolUse Cranelift compiler.
llvm: boolUse LLVM compiler.
experimental_artifact: boolUse the experimental artifact format.
enable_verifier: boolEnable compiler internal verification.
Available for Cranelift, LLVM and Singlepass.
compiler_debug_dir: Option<PathBuf>Debug directory, where IR and object files will be written to.
Available for Cranelift, LLVM and Singlepass.
profiler: Option<Profiler>Enable a profiler.
Available for Cranelift, LLVM and Singlepass.
_enable_pass_params_opt: boolDeprecated option as m0 optimization always play role if we use a static memory
compiler_threads: Option<NonZero<usize>>Sets the number of threads used to compile the input module(s).
enable_nan_canonicalization: boolEnable NaN canonicalization during compilation to produce deterministic canonical quiet NaNs (QNaNs) across architectures.
disable_non_volatile_memops: boolDisable LLVM non-volatile memory operations.
Available for LLVM.
enable_experimental_unaligned_memory_accesses: boolAllow unaligned memory accesses.
This feature is experimental and currently supports only Cranelift scalar types and Singlepass on RISC-V for integral types.
features: WasmFeaturesImplementations§
Source§impl RuntimeOptions
impl RuntimeOptions
fn validate_profiler(&self) -> Result<()>
pub fn get_available_backends(&self) -> Result<Vec<BackendType>>
Sourcepub fn filter_backends_by_features(
backends: Vec<BackendType>,
required_features: &Features,
target: &Target,
) -> Vec<BackendType>
pub fn filter_backends_by_features( backends: Vec<BackendType>, required_features: &Features, target: &Target, ) -> Vec<BackendType>
Filter enabled backends based on required WebAssembly features
pub fn get_store(&self) -> Result<Store>
pub fn get_engine(&self, target: &Target) -> Result<Engine>
pub fn get_engine_for_module( &self, module_contents: &[u8], target: &Target, ) -> Result<Engine>
pub fn get_engine_for_features( &self, required_features: &Features, target: &Target, ) -> Result<Engine>
Sourcepub fn get_features(&self, default_features: &Features) -> Result<Features>
pub fn get_features(&self, default_features: &Features) -> Result<Features>
Get the enabled Wasm features.
Sourcepub fn get_configured_features(&self) -> Result<Features>
pub fn get_configured_features(&self) -> Result<Features>
Get a copy of the default features with user-configured options
Sourcepub fn detect_features_from_wasm(
&self,
wasm_bytes: &[u8],
) -> Result<Features, BinaryReaderError>
pub fn detect_features_from_wasm( &self, wasm_bytes: &[u8], ) -> Result<Features, BinaryReaderError>
Detect features from a WebAssembly module binary.
pub fn get_sys_compiler_engine_for_target( &self, target: Target, ) -> Result<Engine, Error>
pub(crate) fn get_sys_compiler_config( &self, rt: &BackendType, ) -> Result<Box<dyn CompilerConfig>>
Trait Implementations§
Source§impl Args for RuntimeOptions
impl Args for RuntimeOptions
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl Clone for RuntimeOptions
impl Clone for RuntimeOptions
Source§fn clone(&self) -> RuntimeOptions
fn clone(&self) -> RuntimeOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl CommandFactory for RuntimeOptions
impl CommandFactory for RuntimeOptions
Source§impl Debug for RuntimeOptions
impl Debug for RuntimeOptions
Source§impl Default for RuntimeOptions
impl Default for RuntimeOptions
Source§fn default() -> RuntimeOptions
fn default() -> RuntimeOptions
Source§impl FromArgMatches for RuntimeOptions
impl FromArgMatches for RuntimeOptions
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for RuntimeOptions
impl Parser for RuntimeOptions
§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for RuntimeOptions
impl RefUnwindSafe for RuntimeOptions
impl Send for RuntimeOptions
impl Sync for RuntimeOptions
impl Unpin for RuntimeOptions
impl UnsafeUnpin for RuntimeOptions
impl UnwindSafe for RuntimeOptions
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more