Skip to content

Commit 6966953

Browse files
authored
Add per sandbox configuration for crashdumps (#98)
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
1 parent c3bf99f commit 6966953

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/hyperlight_wasm/src/sandbox/sandbox_builder.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,15 @@ impl SandboxBuilder {
9595
self
9696
}
9797

98+
/// Enable or disable crashdump generation for the sandbox
99+
/// When enabled, core dumps will be generated when the guest crashes
100+
/// This requires the `crashdump` feature to be enabled
101+
#[cfg(feature = "crashdump")]
102+
pub fn with_crashdump_enabled(mut self, enabled: bool) -> Self {
103+
self.config.set_guest_core_dump(enabled);
104+
self
105+
}
106+
98107
/// Get the current configuration
99108
pub fn get_config(&self) -> &SandboxConfiguration {
100109
&self.config

src/wasm_runtime/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)