From fed118c7004255500e959b2582f937173b58982c Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sat, 9 Sep 2023 11:06:14 -0700 Subject: [PATCH] Fix rebase of `--inherit-network` --- crates/cli-flags/src/lib.rs | 3 +++ src/commands/run.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/cli-flags/src/lib.rs b/crates/cli-flags/src/lib.rs index 626496d96f71..f149533bee55 100644 --- a/crates/cli-flags/src/lib.rs +++ b/crates/cli-flags/src/lib.rs @@ -239,6 +239,9 @@ wasmtime_option_group! { /// available is dependent on the backends implemented in the /// `wasmtime_wasi_nn` crate. pub nn_graph: Vec, + /// Flag for WASI preview2 to inherit the host's network within the + /// guest so it has full access to all addresses/ports/etc. + pub inherit_network: Option, } diff --git a/src/commands/run.rs b/src/commands/run.rs index 297c9184beb0..975f21bbd737 100644 --- a/src/commands/run.rs +++ b/src/commands/run.rs @@ -943,7 +943,7 @@ impl RunCommand { ); } - if self.inherit_network { + if self.common.wasi.inherit_network == Some(true) { builder.inherit_network(ambient_authority()); }