diff --git a/crates/wasm-compose/src/composer.rs b/crates/wasm-compose/src/composer.rs index 6088bcdd6a..89fc1a1355 100644 --- a/crates/wasm-compose/src/composer.rs +++ b/crates/wasm-compose/src/composer.rs @@ -198,7 +198,7 @@ impl<'a> CompositionGraphBuilder<'a> { ); } - log::warn!( + log::info!( "instance `{name}` will be imported because a dependency named `{component_name}` could not be found" ); Ok(None) diff --git a/src/bin/wasm-tools/compose.rs b/src/bin/wasm-tools/compose.rs index 07b1df78b0..deec423eb4 100644 --- a/src/bin/wasm-tools/compose.rs +++ b/src/bin/wasm-tools/compose.rs @@ -45,6 +45,10 @@ pub struct Opts { /// Output the text format of WebAssembly instead of the binary format. #[clap(short = 't', long)] wat: bool, + + /// Don't print warnings. + #[clap(short, long)] + quiet: bool, } impl Opts { @@ -53,11 +57,13 @@ impl Opts { } pub fn run(self) -> Result<()> { - eprintln!("WARNING: `wasm-tools compose` has been deprecated."); - eprintln!(""); - eprintln!( - "Please use `wac` instead. You can find more information about `wac` at https://github.com/bytecodealliance/wac." - ); + if !self.quiet { + eprintln!("WARNING: `wasm-tools compose` has been deprecated."); + eprintln!(""); + eprintln!( + "Please use `wac` instead. You can find more information about `wac` at https://github.com/bytecodealliance/wac." + ); + } let config = self.create_config()?; log::debug!("configuration:\n{config:#?}"); @@ -82,7 +88,9 @@ impl Opts { } if let Some(path) = self.output.output_path() { - println!("composed component `{}`", path.display()); + if !self.quiet { + println!("composed component `{}`", path.display()); + } } Ok(())