Struct wasmer_cli::commands::run::Run
source · pub struct Run {
env: WasmerEnv,
store: StoreOptions,
wasi: Wasi,
wcgi: WcgiOptions,
stack_size: Option<usize>,
entrypoint: Option<String>,
invoke: Option<String>,
coredump_on_trap: Option<PathBuf>,
input: PackageSource,
args: Vec<String>,
hash_algorithm: Option<HashAlgorithm>,
}
Expand description
The unstable wasmer run
subcommand.
Fields§
§env: WasmerEnv
§store: StoreOptions
§wasi: Wasi
§wcgi: WcgiOptions
§stack_size: Option<usize>
Set the default stack size (default is 1048576)
entrypoint: Option<String>
The entrypoint module for webc packages.
invoke: Option<String>
The function to invoke.
coredump_on_trap: Option<PathBuf>
Generate a coredump at this path if a WebAssembly trap occurs
input: PackageSource
The file, URL, or package to run.
args: Vec<String>
Command-line arguments passed to the package
hash_algorithm: Option<HashAlgorithm>
Hashing algorithm to be used for module hash
Implementations§
source§impl Run
impl Run
pub fn execute(self, output: Output) -> !
fn execute_inner(self, output: Output) -> Result<(), Error>
fn execute_wasm( &self, path: &Path, module: &Module, module_hash: ModuleHash, store: Store, runtime: Arc<dyn Runtime + Send + Sync>, ) -> Result<(), Error>
fn execute_webc( &self, pkg: &BinaryPackage, runtime: Arc<dyn Runtime + Send + Sync>, ) -> Result<(), Error>
fn load_injected_packages( &self, runtime: &Arc<dyn Runtime + Send + Sync>, ) -> Result<Vec<BinaryPackage>, Error>
fn run_wasi( &self, command_name: &str, pkg: &BinaryPackage, uses: Vec<BinaryPackage>, runtime: Arc<dyn Runtime + Send + Sync>, ) -> Result<(), Error>
fn run_wcgi( &self, command_name: &str, pkg: &BinaryPackage, uses: Vec<BinaryPackage>, runtime: Arc<dyn Runtime + Send + Sync>, ) -> Result<(), Error>
fn config_wcgi( &self, config: &mut Config, uses: Vec<BinaryPackage>, ) -> Result<(), Error>
fn run_dcgi( &self, command_name: &str, pkg: &BinaryPackage, uses: Vec<BinaryPackage>, runtime: Arc<dyn Runtime + Send + Sync>, ) -> Result<(), Error>
fn run_dproxy( &self, command_name: &str, pkg: &BinaryPackage, runtime: Arc<dyn Runtime + Send + Sync>, ) -> Result<(), Error>
fn execute_pure_wasm_module( &self, module: &Module, store: &mut Store, ) -> Result<(), Error>
fn build_wasi_runner( &self, runtime: &Arc<dyn Runtime + Send + Sync>, ) -> Result<WasiRunner, Error>
fn execute_wasi_module( &self, wasm_path: &Path, module: &Module, module_hash: ModuleHash, runtime: Arc<dyn Runtime + Send + Sync>, store: Store, ) -> Result<(), Error>
fn maybe_save_coredump(&self, e: &Error)
sourcepub fn from_binfmt_args() -> Self
pub fn from_binfmt_args() -> Self
Create Run instance for arguments/env, assuming we’re being run from a CFP binfmt interpreter.
fn from_binfmt_args_fallible() -> Result<Self, Error>
Trait Implementations§
source§impl Args for Run
impl Args for Run
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 FromArgMatches for Run
impl FromArgMatches for Run
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 Run
impl Parser for Run
§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 Run
impl RefUnwindSafe for Run
impl Send for Run
impl Sync for Run
impl Unpin for Run
impl UnwindSafe for Run
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
§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