Skip to content

Commit f464188

Browse files
committed
remove disable_fortanix_vme_runner_start
1 parent fa9c602 commit f464188

File tree

1 file changed

+10
-27
lines changed

1 file changed

+10
-27
lines changed

fortanix-vme/eif-tools/src/bin/ftxvme-runner-cargo.rs

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,6 @@ struct FortanixVmeConfig {
151151

152152
/// `true` by default. This enables debug mode of `nitro-cli run-enclave`.
153153
debug_mode: bool,
154-
155-
/// fortanix-vme-runner starts a vsock proxy server and
156-
/// is needed if your edp application makes any call to
157-
/// functions like `TcpStream::connect()`.
158-
/// If your application calls `TcpStream::connect("<url:port>")`,
159-
/// this proxy server acts as a bridge for request and responses.
160-
///
161-
/// If this is set to true, this runner won't try to
162-
/// start fortanix-vme-runner.
163-
disable_fortanix_vme_runner_start: bool,
164154
}
165155

166156
impl FortanixVmeConfig {
@@ -172,7 +162,6 @@ impl FortanixVmeConfig {
172162
format!("{}.eif", ARGS[1]).into()
173163
}
174164

175-
176165
/// Tries to parse Cargo.toml for `package.metadata.fortanix-vme` and uses
177166
/// it if found. If some required values are missing in the the metadata,
178167
/// default ones are used.
@@ -211,7 +200,6 @@ impl FortanixVmeConfig {
211200

212201
Ok(config)
213202
}
214-
215203
}
216204

217205
impl Default for FortanixVmeConfig {
@@ -228,7 +216,6 @@ impl Default for FortanixVmeConfig {
228216
resource_path: None,
229217
signing_certificate: None,
230218
private_key: None,
231-
disable_fortanix_vme_runner_start: false,
232219
}
233220
}
234221
}
@@ -247,20 +234,16 @@ fn main() -> anyhow::Result<()> {
247234

248235
run_command(ftxvme_elf2eif)?;
249236

250-
if !fortanix_vme_config.disable_fortanix_vme_runner_start {
251-
// We just try to start fortanix-vme-runner and don't wait on it. So,
252-
// we don't know if it errors out. I think this should be enough
253-
// as purpose of the runner is to provide easy setup. If someone really wants to
254-
// be sure, they can set `disable_fortanix_vme_runner_start` to true and start
255-
// it manually.
256-
//
257-
// If required, other option can be to link fortanix-vme-runner as a library and spawn the
258-
// proxy server in another thread. The thing here will be that if fortanix-vme-runner
259-
// already running, it will error out will addr in use. To be sure, we could probably
260-
// communicate with fortanix-vme-runner.
261-
let mut fortanix_vme_runner = command!("fortanix-vme-runner");
262-
fortanix_vme_runner.spawn().context("Failed to start fortanix-vme-runner")?;
263-
}
237+
// We just try to start fortanix-vme-runner and don't wait on it. So,
238+
// we don't know if it errors out.
239+
//
240+
// fortanix-vme-runner starts a vsock proxy server and
241+
// is needed if your edp application makes any call to
242+
// functions like `TcpStream::connect()`.
243+
// If your application calls `TcpStream::connect("<url:port>")`,
244+
// this proxy server acts as a bridge for request and responses.
245+
let mut fortanix_vme_runner = command!("fortanix-vme-runner");
246+
fortanix_vme_runner.spawn().context("Failed to start fortanix-vme-runner")?;
264247

265248
let nitro_cli_run_enclave = command! {
266249
"nitro-cli" => args(

0 commit comments

Comments
 (0)