|
|
|
@ -118,6 +118,9 @@ struct CargoWasmPackProfileWasmBindgen { |
|
|
|
|
|
|
|
|
|
#[serde(default, rename = "dwarf-debug-info")] |
|
|
|
|
dwarf_debug_info: Option<bool>, |
|
|
|
|
|
|
|
|
|
#[serde(default, rename = "omit-default-module-path")] |
|
|
|
|
omit_default_module_path: Option<bool>, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
struct Collector(Vec<u8>); |
|
|
|
@ -283,6 +286,7 @@ impl CargoWasmPackProfile { |
|
|
|
|
debug_js_glue: Some(true), |
|
|
|
|
demangle_name_section: Some(true), |
|
|
|
|
dwarf_debug_info: Some(false), |
|
|
|
|
omit_default_module_path: Some(false), |
|
|
|
|
}, |
|
|
|
|
wasm_opt: None, |
|
|
|
|
} |
|
|
|
@ -294,6 +298,7 @@ impl CargoWasmPackProfile { |
|
|
|
|
debug_js_glue: Some(false), |
|
|
|
|
demangle_name_section: Some(true), |
|
|
|
|
dwarf_debug_info: Some(false), |
|
|
|
|
omit_default_module_path: Some(false), |
|
|
|
|
}, |
|
|
|
|
wasm_opt: Some(CargoWasmPackProfileWasmOpt::Enabled(true)), |
|
|
|
|
} |
|
|
|
@ -305,6 +310,7 @@ impl CargoWasmPackProfile { |
|
|
|
|
debug_js_glue: Some(false), |
|
|
|
|
demangle_name_section: Some(true), |
|
|
|
|
dwarf_debug_info: Some(false), |
|
|
|
|
omit_default_module_path: Some(false), |
|
|
|
|
}, |
|
|
|
|
wasm_opt: Some(CargoWasmPackProfileWasmOpt::Enabled(true)), |
|
|
|
|
} |
|
|
|
@ -346,6 +352,7 @@ impl CargoWasmPackProfile { |
|
|
|
|
d!(wasm_bindgen.debug_js_glue); |
|
|
|
|
d!(wasm_bindgen.demangle_name_section); |
|
|
|
|
d!(wasm_bindgen.dwarf_debug_info); |
|
|
|
|
d!(wasm_bindgen.omit_default_module_path); |
|
|
|
|
|
|
|
|
|
if self.wasm_opt.is_none() { |
|
|
|
|
self.wasm_opt = defaults.wasm_opt.clone(); |
|
|
|
@ -367,6 +374,11 @@ impl CargoWasmPackProfile { |
|
|
|
|
self.wasm_bindgen.dwarf_debug_info.unwrap() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// Get this profile's configured `[wasm-bindgen.omit-default-module-path]` value.
|
|
|
|
|
pub fn wasm_bindgen_omit_default_module_path(&self) -> bool { |
|
|
|
|
self.wasm_bindgen.omit_default_module_path.unwrap() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// Get this profile's configured arguments for `wasm-opt`, if enabled.
|
|
|
|
|
pub fn wasm_opt_args(&self) -> Option<Vec<String>> { |
|
|
|
|
match self.wasm_opt.as_ref()? { |
|
|
|
|