Struct wasmtime_cli::commands::RunCommand
source · pub struct RunCommand {
pub run: RunCommon,
pub dirs: Vec<(String, String)>,
pub vars: Vec<(String, Option<String>)>,
pub invoke: Option<String>,
pub preloads: Vec<(String, PathBuf)>,
pub module_and_args: Vec<OsString>,
}
Expand description
Runs a WebAssembly module
Fields§
§run: RunCommon
§dirs: Vec<(String, String)>
Grant access of a host directory to a guest.
If specified as just HOST_DIR
then the same directory name on the
host is made available within the guest. If specified as HOST::GUEST
then the HOST
directory is opened and made available as the name
GUEST
in the guest.
vars: Vec<(String, Option<String>)>
Pass an environment variable to the program.
The --env FOO=BAR
form will set the environment variable named FOO
to the value BAR
for the guest program using WASI. The --env FOO
form will set the environment variable named FOO
to the same value it
has in the calling process for the guest, or in other words it will
cause the environment variable FOO
to be inherited.
invoke: Option<String>
The name of the function to run
preloads: Vec<(String, PathBuf)>
Load the given WebAssembly module before the main module
module_and_args: Vec<OsString>
The WebAssembly module to run and arguments to pass to it.
Arguments passed to the wasm module will be configured as WASI CLI
arguments unless the --invoke
CLI argument is passed in which case
arguments will be interpreted as arguments to the function specified.
Implementations§
Trait Implementations§
source§impl Args for RunCommand
impl Args for RunCommand
source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
source§impl CommandFactory for RunCommand
impl CommandFactory for RunCommand
source§impl FromArgMatches for RunCommand
impl FromArgMatches for RunCommand
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 RunCommand
impl Parser for RunCommand
source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
source§impl PartialEq for RunCommand
impl PartialEq for RunCommand
source§fn eq(&self, other: &RunCommand) -> bool
fn eq(&self, other: &RunCommand) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for RunCommand
Auto Trait Implementations§
impl Freeze for RunCommand
impl RefUnwindSafe for RunCommand
impl Send for RunCommand
impl Sync for RunCommand
impl Unpin for RunCommand
impl UnwindSafe for RunCommand
Blanket Implementations§
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> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self
file descriptor.source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
self
file descriptor. Read more