Skip to content

Commit d2da14e

Browse files
committed
Add trace_guest feature in hyperlight-wasm to allow enabling tracing guests
Signed-off-by: Doru Blânzeanu <[email protected]>
1 parent 75cf193 commit d2da14e

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/hyperlight_wasm/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ crashdump = ["hyperlight-host/crashdump"]
9090
gdb = ["hyperlight-host/gdb"]
9191
kvm = ["hyperlight-host/kvm"]
9292
mshv3 = ["hyperlight-host/mshv3"]
93+
trace_guest = ["hyperlight-host/trace_guest"]
9394

9495
[[bench]]
9596
name = "benchmarks"

src/hyperlight_wasm/build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ fn build_wasm_runtime() -> PathBuf {
144144
if std::env::var("CARGO_FEATURE_GDB").is_ok() {
145145
cmd = cmd.arg("--features").arg("gdb");
146146
}
147+
// Enable the "trace_guest" feature if the corresponding Cargo feature is enabled
148+
if std::env::var("CARGO_FEATURE_TRACE_GUEST").is_ok() {
149+
cmd = cmd.arg("--features").arg("trace_guest");
150+
}
147151

148152
let status = cmd
149153
.status()

src/wasm_runtime/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,6 @@ reqwest = {version = "0.12", default-features = false, features = ["blocking","
2828
[workspace] # indicate that this crate is not part of any workspace
2929

3030
[features]
31+
default = []
3132
gdb = ["wasmtime/debug-builtins"]
33+
trace_guest = ["hyperlight-common/trace_guest", "hyperlight-guest/trace_guest", "hyperlight-guest-bin/trace_guest"]

0 commit comments

Comments
 (0)