mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-16 22:41:24 +00:00
Remove debug sections by default
The changes on master Rust insert debug sections now (yay!) but this means that wasm binaries by default pick up debug sections from the standard library, so let's remove them by default in wasm-bindgen unless `--debug` is passed
This commit is contained in:
@ -31,6 +31,7 @@ pub struct Bindgen {
|
||||
debug: bool,
|
||||
typescript: bool,
|
||||
demangle: bool,
|
||||
keep_debug: bool,
|
||||
}
|
||||
|
||||
impl Bindgen {
|
||||
@ -45,6 +46,7 @@ impl Bindgen {
|
||||
debug: false,
|
||||
typescript: false,
|
||||
demangle: true,
|
||||
keep_debug: false,
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,6 +95,11 @@ impl Bindgen {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn keep_debug(&mut self, keep_debug: bool) -> &mut Bindgen {
|
||||
self.keep_debug = keep_debug;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn generate<P: AsRef<Path>>(&mut self, path: P) -> Result<(), Error> {
|
||||
self._generate(path.as_ref())
|
||||
}
|
||||
|
Reference in New Issue
Block a user