Struct wasmer_cli::backend::RuntimeOptions
source · pub struct RuntimeOptions {
singlepass: bool,
cranelift: bool,
llvm: bool,
enable_verifier: bool,
llvm_debug_dir: Option<PathBuf>,
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.
llvm_debug_dir: Option<PathBuf>
LLVM debug directory, where IR and object files will be written to.
Only available for the LLVM compiler.
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>
Report the [
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
Returns a copy 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 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
Returns the “default value” for a type. Read more
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>
Assign values from
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>
Assign values from
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
Parse from iterator, exit on error
§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Update from iterator, exit on error
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
Update from iterator, return Err on 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 = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
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)
🔬This is a nightly-only experimental API. (
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>
Converts
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>
Converts
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§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Pointee for T
impl<T> Pointee for T
§impl<T> Upcastable for T
impl<T> Upcastable for T
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref
§fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
upcast boxed dyn