pub struct BuildOptions {Show 16 fields
pub path: Option<PathBuf>,
pub scope: Option<String>,
pub mode: InstallMode,
pub disable_dts: bool,
pub weak_refs: bool,
pub reference_types: 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 no_pack: bool,
pub no_opt: bool,
pub extra_options: Vec<String>,
}Expand description
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: InstallModeSets steps to be run. [possible values: no-install, normal, force]
disable_dts: boolBy default a *.d.ts file is generated for the generated JS file, but this flag will disable generating this TypeScript file.
weak_refs: boolEnable usage of the JS weak references proposal.
reference_types: boolEnable usage of WebAssembly reference types.
target: TargetSets the target environment. [possible values: bundler, nodejs, web, no-modules, deno]
debug: boolDeprecated. Renamed to --dev.
dev: boolCreate a development build. Enable debug info, and disable optimizations.
release: boolCreate a release build. Enable optimizations and disable debug info.
profiling: boolCreate a profiling build. Enable optimizations and debug info.
out_dir: StringSets the output directory with a relative path.
out_name: Option<String>Sets the output file names. Defaults to package name.
no_pack: boolOption to not generate a package.json
no_opt: boolOption to skip optimization with wasm-opt
extra_options: Vec<String>List of extra options to pass to cargo build
Trait Implementationsยง
Sourceยงimpl Args for BuildOptions
impl Args for BuildOptions
Sourceยงfn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Sourceยงfn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSourceยงimpl Debug for BuildOptions
impl Debug for BuildOptions
Sourceยงimpl Default for BuildOptions
impl Default for BuildOptions
Sourceยงimpl FromArgMatches for BuildOptions
impl FromArgMatches for BuildOptions
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(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementationsยง
impl Freeze for BuildOptions
impl RefUnwindSafe for BuildOptions
impl Send for BuildOptions
impl Sync for BuildOptions
impl Unpin for BuildOptions
impl UnwindSafe for BuildOptions
Blanket Implementationsยง
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
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