Skip to content

Commit 05dee64

Browse files
authored
Remove dump_wat feature from codegen (#908)
1 parent 32dd15f commit 05dee64

File tree

3 files changed

+1
-43
lines changed

3 files changed

+1
-43
lines changed

Cargo.lock

+1-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/codegen/Cargo.toml

-2
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ categories = ["wasm"]
1111

1212
[features]
1313
plugin_internal = []
14-
dump_wat = ["dep:wasmprinter"]
1514

1615
[dependencies]
1716
wizer = { workspace = true }
1817
anyhow = { workspace = true }
1918
brotli = "7.0.0"
20-
wasmprinter = { version = "0.224.0", optional = true }
2119
wasmtime = { workspace = true }
2220
wasmtime-wasi = { workspace = true }
2321
wasi-common = { workspace = true }

crates/codegen/src/lib.rs

-17
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,6 @@ impl Generator {
499499
}
500500
}
501501

502-
// Run the calling code with the `dump_wat` feature enabled to print the WAT to stdout
503-
//
504502
// For the example generated WAT, the `bytecode_len` is 137
505503
// (module
506504
// (type (;0;) (func))
@@ -582,21 +580,6 @@ impl Generator {
582580
}
583581

584582
let wasm = self.postprocess(&mut module)?;
585-
print_wat(&wasm)?;
586583
Ok(wasm)
587584
}
588585
}
589-
590-
#[cfg(feature = "dump_wat")]
591-
fn print_wat(wasm_binary: &[u8]) -> Result<()> {
592-
println!(
593-
"Generated WAT: \n{}",
594-
wasmprinter::print_bytes(wasm_binary)?
595-
);
596-
Ok(())
597-
}
598-
599-
#[cfg(not(feature = "dump_wat"))]
600-
fn print_wat(_wasm_binary: &[u8]) -> Result<()> {
601-
Ok(())
602-
}

0 commit comments

Comments
 (0)