mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-06 20:58:28 +00:00
Revert some changes we don't want
This commit is contained in:
@@ -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<String>,
|
||||
/// 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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
mod handler;
|
||||
mod runner;
|
||||
|
||||
pub use self::runner::{Callbacks, Config, WcgiRunner, AbortHandle};
|
||||
pub use self::runner::{Callbacks, Config, WcgiRunner};
|
||||
|
||||
@@ -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<Arc<dyn VirtualTaskManager>>,
|
||||
wasi: CommonWasiOptions,
|
||||
pub addr: SocketAddr,
|
||||
addr: SocketAddr,
|
||||
#[derivative(Debug = "ignore")]
|
||||
callbacks: Arc<dyn Callbacks>,
|
||||
store: Option<Arc<Store>>,
|
||||
@@ -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]) {}
|
||||
|
||||
Reference in New Issue
Block a user