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 CommandFactory for Cmd

source§

fn command<'b>() -> Command

Build a [Command] that can instantiate Self. Read more
source§

fn command_for_update<'b>() -> Command

Build a [Command] that can update self. Read more
source§

impl Debug for Cmd

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl FromArgMatches for Cmd

source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
source§

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<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

impl Parser for Cmd

§

fn parse() -> Self

Parse from std::env::args_os(), exit on error
§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error
§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error
§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.
source§

impl Subcommand for Cmd

source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self. Read more
source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can update self. Read more
source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto 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§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

§

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 N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Metadata = ()

The metadata type for pointers and references to this type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcastable for T
where T: Any + Send + Sync + 'static,

§

fn upcast_any_ref(&self) -> &(dyn Any + 'static)

upcast ref
§

fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)

upcast mut ref
§

fn upcast_any_box(self: Box<T>) -> Box<dyn Any>

upcast boxed dyn
§

impl<T> Upcastable for T
where T: Any + Debug + 'static,

§

fn upcast_any_ref(&self) -> &(dyn Any + 'static)

§

fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)

§

fn upcast_any_box(self: Box<T>) -> Box<dyn Any>

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

§

impl<T> IsFieldType<T> for T

§

impl<T> MaybeSendSync for T