pub struct BuildOptions {Show 17 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 profile: Option<String>,
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.
profile: Option<String>User-defined profile with –profile flag
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.