Struct wasmer_cli::backend::RuntimeOptions
source · pub struct RuntimeOptions {
singlepass: bool,
cranelift: bool,
llvm: bool,
enable_verifier: bool,
profiler: Option<Profiler>,
llvm_debug_dir: Option<PathBuf>,
enable_pass_params_opt: bool,
llvm_num_threads: Option<NonZero<usize>>,
features: WasmFeatures,
}
Expand description
The compiler options
Fields§
§singlepass: bool
Use Singlepass compiler.
cranelift: bool
Use Cranelift compiler.
llvm: bool
Use LLVM compiler.
enable_verifier: bool
Enable compiler internal verification.
Available for cranelift, LLVM and singlepass.
profiler: Option<Profiler>
Enable a profiler.
Available for cranelift, LLVM and singlepass.
llvm_debug_dir: Option<PathBuf>
LLVM debug directory, where IR and object files will be written to.
Only available for the LLVM compiler.
enable_pass_params_opt: bool
Only available for the LLVM compiler. Enable the “pass-params” optimization, where the first (#0) global and the first (#0) memory passed between guest functions as explicit parameters.
llvm_num_threads: Option<NonZero<usize>>
Only available for the LLVM compiler. Sets the number of threads used to compile the input module(s).
features: WasmFeatures
Implementations§
source§impl RuntimeOptions
impl RuntimeOptions
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, features: &Features) -> Result<Features>
pub fn get_features(&self, features: &Features) -> Result<Features>
Get the enaled 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
source§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 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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§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