wasmer_config::package

Struct Package

Source
#[non_exhaustive]
pub struct Package {
Show 13 fields pub name: Option<String>, pub version: Option<Version>, pub description: Option<String>, pub license: Option<String>, pub license_file: Option<PathBuf>, pub readme: Option<PathBuf>, pub repository: Option<String>, pub homepage: Option<String>, pub wasmer_extra_flags: Option<String>, pub disable_command_rename: bool, pub rename_commands_to_raw_command_name: bool, pub entrypoint: Option<String>, pub private: bool,
}
Expand description

Package definition for a Wasmer package.

Usually stored in a wasmer.toml file.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§name: Option<String>

The package’s name in the form namespace/name.

§version: Option<Version>

The package’s version number.

§description: Option<String>

A brief description of the package.

§license: Option<String>

A SPDX license specifier for this package.

§license_file: Option<PathBuf>

The location of the license file, useful for non-standard licenses

§readme: Option<PathBuf>

The package’s README file.

§repository: Option<String>

A URL pointing to the package’s source code.

§homepage: Option<String>

The website used as the package’s homepage.

§wasmer_extra_flags: Option<String>
👎Deprecated since 0.9.2: Use runner-specific command attributes instead
§disable_command_rename: bool
👎Deprecated since 0.9.2: Does nothing. Prefer a runner-specific command attribute instead
§rename_commands_to_raw_command_name: bool
👎Deprecated since 0.9.2: Does nothing. Prefer a runner-specific command attribute instead

Unlike, disable-command-rename which prevents wasmer run <Module name>, this flag enables the command rename of wasmer run <COMMAND_NAME> into just <COMMAND_NAME>. This is useful for programs that need to inspect their argv[0] names and when the command name matches their executable name.

§entrypoint: Option<String>

The name of the command that should be used by wasmer run by default.

§private: bool

Mark this as a private package

Implementations§

Source§

impl Package

Source

pub fn new_empty() -> Self

Source

pub fn builder( name: impl Into<String>, version: Version, description: impl Into<String>, ) -> PackageBuilder

Create a PackageBuilder populated with all mandatory fields.

Trait Implementations§

Source§

impl Clone for Package

Source§

fn clone(&self) -> Package

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Package

Source§

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

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

impl<'de> Deserialize<'de> for Package

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Package

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

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
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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,