Skip to content

Commit 5853b61

Browse files
committed
add some cli output while building the js module
Signed-off-by: karthik Ganeshram <[email protected]>
1 parent d0c0794 commit 5853b61

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

crates/spin-js-cli/src/main.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ fn main() -> Result<()> {
2929

3030
if env::var("SPIN_JS_WIZEN").eq(&Ok("1".into())) {
3131
env::remove_var("SPIN_JS_WIZEN");
32+
33+
println!("\nStarting to build Spin compatible module");
3234

3335
let wasm: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/engine.wasm"));
3436

@@ -43,6 +45,8 @@ fn main() -> Result<()> {
4345
}
4446
#[cfg(not(target_os = "windows"))]
4547
{
48+
println!("Preinitiating using Wizer");
49+
4650
let mut wasm = Wizer::new()
4751
.allow_wasi(true)?
4852
.inherit_stdio(true)
@@ -54,6 +58,8 @@ fn main() -> Result<()> {
5458
debug_info: false,
5559
};
5660

61+
println!("Optimizing wasm binary using wasm-opt");
62+
5763
if let Ok(mut module) = Module::read(&wasm) {
5864
module.optimize(&codegen_cfg);
5965
module
@@ -87,5 +93,7 @@ fn main() -> Result<()> {
8793
bail!("Couldn't create wasm from input");
8894
}
8995

96+
println!("Spin compatible module built successfully");
97+
9098
Ok(())
9199
}

0 commit comments

Comments
 (0)