[][src]Struct wasm_pack::command::build::BuildOptions

pub struct BuildOptions {
    pub path: Option<PathBuf>,
    pub scope: Option<String>,
    pub mode: InstallMode,
    pub disable_dts: bool,
    pub target: Target,
    pub debug: bool,
    pub dev: bool,
    pub release: bool,
    pub profiling: bool,
    pub out_dir: String,
    pub out_name: Option<String>,
    pub extra_options: Vec<String>,
}

Everything required to configure and run the wasm-pack build command.

Fields

path: Option<PathBuf>

The path to the Rust crate. If not set, searches up the path from the current directory.

scope: Option<String>

The npm scope to use in package.json, if any.

mode: InstallMode

Sets steps to be run. [possible values: no-install, normal, force]

disable_dts: bool

By default a *.d.ts file is generated for the generated JS file, but this flag will disable generating this TypeScript file.

target: Target

Sets the target environment. [possible values: bundler, nodejs, web, no-modules]

debug: bool

Deprecated. Renamed to --dev.

dev: bool

Create a development build. Enable debug info, and disable optimizations.

release: bool

Create a release build. Enable optimizations and disable debug info.

profiling: bool

Create a profiling build. Enable optimizations and debug info.

out_dir: String

Sets the output directory with a relative path.

out_name: Option<String>

Sets the output file names. Defaults to package name.

extra_options: Vec<String>

List of extra options to pass to cargo build

Trait Implementations

impl Debug for BuildOptions[src]

impl Default for BuildOptions[src]

impl StructOpt for BuildOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

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