From 3d70f2e069a5b8e2240c25f6979ad67f377d6059 Mon Sep 17 00:00:00 2001 From: James Sturtevant Date: Wed, 2 Jul 2025 23:05:32 +0000 Subject: [PATCH] Add per sandbox configuration for crashdumps Signed-off-by: James Sturtevant --- src/hyperlight_wasm/src/sandbox/sandbox_builder.rs | 9 +++++++++ src/wasm_runtime/Cargo.lock | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/hyperlight_wasm/src/sandbox/sandbox_builder.rs b/src/hyperlight_wasm/src/sandbox/sandbox_builder.rs index 7c92e74..ce9292c 100644 --- a/src/hyperlight_wasm/src/sandbox/sandbox_builder.rs +++ b/src/hyperlight_wasm/src/sandbox/sandbox_builder.rs @@ -95,6 +95,15 @@ impl SandboxBuilder { self } + /// Enable or disable crashdump generation for the sandbox + /// When enabled, core dumps will be generated when the guest crashes + /// This requires the `crashdump` feature to be enabled + #[cfg(feature = "crashdump")] + pub fn with_crashdump_enabled(mut self, enabled: bool) -> Self { + self.config.set_guest_core_dump(enabled); + self + } + /// Get the current configuration pub fn get_config(&self) -> &SandboxConfiguration { &self.config diff --git a/src/wasm_runtime/Cargo.lock b/src/wasm_runtime/Cargo.lock index e4be3ab..b5739be 100644 --- a/src/wasm_runtime/Cargo.lock +++ b/src/wasm_runtime/Cargo.lock @@ -654,7 +654,7 @@ dependencies = [ [[package]] name = "hyperlight-wasm-macro" -version = "0.1.0" +version = "0.7.0" dependencies = [ "hyperlight-component-util", "itertools", @@ -1761,7 +1761,7 @@ dependencies = [ [[package]] name = "wasm-runtime" -version = "0.1.0" +version = "0.7.0" dependencies = [ "cargo_metadata", "cc",