Enum wasmer_cli::commands::Cmd
source · enum Cmd {
Show 28 variants
Login(Login),
Auth(CmdAuth),
Publish(PackagePublish),
Cache(Cache),
Validate(Validate),
Compile(Compile),
CreateExe(CreateExe),
CreateObj(CreateObj),
GenCHeader(GenCHeader),
Config(Config),
SelfUpdate(SelfUpdate),
Inspect(Inspect),
Init(Init),
Wast(Wast),
Binfmt(Binfmt),
Whoami(Whoami),
Add(CmdAdd),
Run(Run),
Journal(CmdJournal),
Package(Package),
Container(Container),
Deploy(CmdAppDeploy),
App(CmdApp),
Ssh(CmdSsh),
Namespace(CmdNamespace),
Domain(CmdDomain),
GenCompletions(CmdGenCompletions),
GenManPage(CmdGenManPage),
}
Expand description
The options for the wasmer Command Line Interface
Variants§
Login(Login)
Login into a wasmer.io-like registry
Auth(CmdAuth)
Publish(PackagePublish)
Publish a package to a registry [alias: package publish]
Cache(Cache)
Manage the local Wasmer cache
Validate(Validate)
Validate a WebAssembly binary
Compile(Compile)
Compile a WebAssembly binary
CreateExe(CreateExe)
Compile a WebAssembly binary into a native executable
To use, you need to set the WASMER_DIR
environment variable
to the location of your Wasmer installation. This will probably be ~/.wasmer
. It
should include a lib
, include
and bin
subdirectories. To create an executable
you will need libwasmer
, so by setting WASMER_DIR
the CLI knows where to look for
header files and libraries.
Example usage:
$ # in two lines:
$ export WASMER_DIR=/home/user/.wasmer/
$ wasmer create-exe qjs.wasm -o qjs.exe # or in one line:
$ WASMER_DIR=/home/user/.wasmer/ wasmer create-exe qjs.wasm -o qjs.exe
$ file qjs.exe
qjs.exe: ELF 64-bit LSB pie executable, x86-64 ...
§Cross-compilation
Accepted target triple values must follow the ‘target_lexicon’ crate format.
The recommended targets we try to support are:
- “x86_64-linux-gnu”
- “aarch64-linux-gnu”
- “x86_64-apple-darwin”
- “arm64-apple-darwin”
CreateObj(CreateObj)
Compile a WebAssembly binary into an object file
To use, you need to set the WASMER_DIR
environment variable to the location of your
Wasmer installation. This will probably be ~/.wasmer
. It should include a lib
,
include
and bin
subdirectories. To create an object you will need libwasmer
, so by
setting WASMER_DIR
the CLI knows where to look for header files and libraries.
Example usage:
$ # in two lines:
$ export WASMER_DIR=/home/user/.wasmer/
$ wasmer create-obj qjs.wasm --object-format symbols -o qjs.obj # or in one line:
$ WASMER_DIR=/home/user/.wasmer/ wasmer create-exe qjs.wasm --object-format symbols -o qjs.obj
$ file qjs.obj
qjs.obj: ELF 64-bit LSB relocatable, x86-64 ...
§Cross-compilation
Accepted target triple values must follow the ‘target_lexicon’ crate format.
The recommended targets we try to support are:
- “x86_64-linux-gnu”
- “aarch64-linux-gnu”
- “x86_64-apple-darwin”
- “arm64-apple-darwin”
GenCHeader(GenCHeader)
Generate the C static_defs.h header file for the input .wasm module
Config(Config)
Get various configuration information needed to compile programs which use Wasmer
SelfUpdate(SelfUpdate)
Update wasmer to the latest version
Inspect(Inspect)
Inspect a WebAssembly file
Init(Init)
Initializes a new wasmer.toml file
Wast(Wast)
Run spec testsuite
Binfmt(Binfmt)
Unregister and/or register wasmer as binfmt interpreter
Whoami(Whoami)
Shows the current logged in user for the current active registry
Add(CmdAdd)
Add a Wasmer package’s bindings to your application
Run(Run)
Run a WebAssembly file or Wasmer container
Journal(CmdJournal)
Manage journals (compacting, inspecting, filtering, …)
Package(Package)
Container(Container)
Deploy(CmdAppDeploy)
Deploy apps to Wasmer Edge [alias: app deploy]
App(CmdApp)
Create and manage Wasmer Edge apps
Ssh(CmdSsh)
Run commands/packages on Wasmer Edge in an interactive shell session
Namespace(CmdNamespace)
Manage Wasmer namespaces
Domain(CmdDomain)
Manage DNS records
GenCompletions(CmdGenCompletions)
Generate autocompletion for different shells
GenManPage(CmdGenManPage)
Generate man pages
Trait Implementations§
source§impl FromArgMatches for Cmd
impl FromArgMatches for Cmd
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<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.source§impl Parser for Cmd
impl Parser for Cmd
§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>
source§impl Subcommand for Cmd
impl Subcommand for Cmd
source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
source§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self
can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Cmd
impl RefUnwindSafe for Cmd
impl Send for Cmd
impl Sync for Cmd
impl Unpin for Cmd
impl UnwindSafe for Cmd
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
§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