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

pub struct BuildOptions {
    pub path: Option<PathBuf>,
    pub scope: Option<String>,
    pub mode: BuildMode,
    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.

scope: Option<String>

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

mode: BuildMode

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: browser, 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 Default for BuildOptions[src]

impl Debug for BuildOptions[src]

impl StructOpt for BuildOptions[src]

default fn from_args() -> Self[src]

Gets the struct from the command line arguments. Print the error message and quit the program in case of failure. Read more

default fn from_iter<I>(iter: I) -> Self where
    I: IntoIterator,
    <I as IntoIterator>::Item: Into<OsString>,
    <I as IntoIterator>::Item: Clone
[src]

Gets the struct from any iterator such as a Vec of your making. Print the error message and quit the program in case of failure. Read more

default fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
    I: IntoIterator,
    <I as IntoIterator>::Item: Into<OsString>,
    <I as IntoIterator>::Item: Clone
[src]

Gets the struct from any iterator such as a Vec of your making. Read more

Auto Trait Implementations

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T