mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 02:00:51 +00:00
Hook up debug to the CLI
This commit is contained in:
parent
b548239e02
commit
f1d425b943
@ -19,6 +19,7 @@ Options:
|
||||
--output-ts FILE Output TypeScript file
|
||||
--output-wasm FILE Output WASM file
|
||||
--nodejs Generate output for node.js, not the browser
|
||||
--debug Include otherwise-extraneous debug checks in output
|
||||
";
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
@ -26,6 +27,7 @@ struct Args {
|
||||
flag_output_ts: Option<PathBuf>,
|
||||
flag_output_wasm: Option<PathBuf>,
|
||||
flag_nodejs: bool,
|
||||
flag_debug: bool,
|
||||
arg_input: PathBuf,
|
||||
}
|
||||
|
||||
@ -37,6 +39,7 @@ fn main() {
|
||||
let mut b = Bindgen::new();
|
||||
b.input_path(&args.arg_input);
|
||||
b.nodejs(args.flag_nodejs);
|
||||
b.debug(args.flag_debug);
|
||||
let ret = b.generate().expect("failed to generate bindings");
|
||||
if let Some(ref ts) = args.flag_output_ts {
|
||||
ret.write_ts_to(ts).expect("failed to write TypeScript output file");
|
||||
|
Loading…
x
Reference in New Issue
Block a user