diff --git a/lib/cli/src/commands/run_unstable.rs b/lib/cli/src/commands/run_unstable.rs index eb0016a00..8ef2b98b8 100644 --- a/lib/cli/src/commands/run_unstable.rs +++ b/lib/cli/src/commands/run_unstable.rs @@ -29,7 +29,6 @@ use wasmer_wasix::runners::{MappedDirectory, Runner, WapmContainer}; use webc::metadata::Manifest; use webc_v4::DirOrFile; -use crate::logging; use crate::{ store::StoreOptions, wasmer_home::{DownloadCached, ModuleCache, WasmerHome}, @@ -59,9 +58,6 @@ pub struct RunUnstable { input: PackageSource, /// Command-line arguments passed to the package args: Vec, - /// Enable debug output - #[clap(long = "debug", short = 'd')] - pub(crate) debug: bool, } impl RunUnstable { @@ -81,11 +77,6 @@ impl RunUnstable { ExecutableTarget::Webc(container) => self.execute_webc(&target, &container, &mut store), }; - if self.debug { - let level = log::LevelFilter::Debug; - logging::set_up_logging(level); - } - if let Err(e) = &result { if let Some(coredump) = &self.coredump_on_trap { if let Err(e) = generate_coredump(e, target.path(), coredump) { @@ -614,11 +605,6 @@ impl Default for Callbacks { } impl wasmer_wasix::runners::wcgi::Callbacks for Callbacks { - /// A callback that is called whenever the server starts. - fn started(&self, config: &wasmer_wasix::runners::wcgi::Config, _abort: wasmer_wasix::runners::wcgi::AbortHandle) { - println!("WCGI Server running at http://{}/", config.addr); - } - fn on_stderr(&self, raw_message: &[u8]) { if let Ok(mut stderr) = self.stderr.lock() { // If the WCGI runner printed any log messages we want to make sure diff --git a/lib/wasi/src/runners/wcgi/mod.rs b/lib/wasi/src/runners/wcgi/mod.rs index 55bfba8f2..ddfe6d783 100644 --- a/lib/wasi/src/runners/wcgi/mod.rs +++ b/lib/wasi/src/runners/wcgi/mod.rs @@ -1,4 +1,4 @@ mod handler; mod runner; -pub use self::runner::{Callbacks, Config, WcgiRunner, AbortHandle}; +pub use self::runner::{Callbacks, Config, WcgiRunner}; diff --git a/lib/wasi/src/runners/wcgi/runner.rs b/lib/wasi/src/runners/wcgi/runner.rs index 7cc347972..892a53b63 100644 --- a/lib/wasi/src/runners/wcgi/runner.rs +++ b/lib/wasi/src/runners/wcgi/runner.rs @@ -1,7 +1,7 @@ use std::{net::SocketAddr, sync::Arc, time::Duration}; use anyhow::{Context, Error}; -pub use futures::future::AbortHandle; +use futures::future::AbortHandle; use http::{Request, Response}; use hyper::Body; use tower::{make::Shared, ServiceBuilder}; @@ -86,7 +86,7 @@ impl WcgiRunner { let (shutdown, abort_handle) = futures::future::abortable(futures::future::pending::<()>()); - callbacks.started(&self.config, abort_handle); + callbacks.started(abort_handle); hyper::Server::bind(&address) .serve(Shared::new(service)) @@ -249,7 +249,7 @@ impl crate::runners::Runner for WcgiRunner { pub struct Config { task_manager: Option>, wasi: CommonWasiOptions, - pub addr: SocketAddr, + addr: SocketAddr, #[derivative(Debug = "ignore")] callbacks: Arc, store: Option>, @@ -356,7 +356,7 @@ struct Annotations { /// and any WebAssembly instances it may start. pub trait Callbacks: Send + Sync + 'static { /// A callback that is called whenever the server starts. - fn started(&self, _config: &Config, _abort: AbortHandle) {} + fn started(&self, _abort: AbortHandle) {} /// Data was written to stderr by an instance. fn on_stderr(&self, _stderr: &[u8]) {}