Skip to content

Update hyperlight-guest-tracing crate to conditionally enable traces at compile time #752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/hyperlight_guest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Provides only the essential building blocks for interacting with the host enviro
anyhow = { version = "1.0.98", default-features = false }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
hyperlight-common = { workspace = true }
hyperlight-guest-tracing = { workspace = true }
hyperlight-guest-tracing = { workspace = true, default-features = false }

[features]
default = []
trace_guest = []
trace_guest = ["hyperlight-guest-tracing/trace"]
4 changes: 2 additions & 2 deletions src/hyperlight_guest_bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ and third-party code used by our C-API needed to build a native hyperlight-guest
default = ["libc", "printf"]
libc = [] # compile musl libc
printf = [ "libc" ] # compile printf
trace_guest = ["hyperlight-common/trace_guest", "hyperlight-guest/trace_guest"]
trace_guest = ["hyperlight-common/trace_guest", "hyperlight-guest/trace_guest", "hyperlight-guest-tracing/trace"]
mem_profile = ["hyperlight-common/unwind_guest","hyperlight-common/mem_profile"]

[dependencies]
hyperlight-guest = { workspace = true, default-features = false }
hyperlight-common = { workspace = true, default-features = false }
hyperlight-guest-tracing = { workspace = true }
hyperlight-guest-tracing = { workspace = true, default-features = false }
buddy_system_allocator = "0.11.0"
log = { version = "0.4", default-features = false }
spin = "0.10.0"
Expand Down
6 changes: 5 additions & 1 deletion src/hyperlight_guest_tracing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ readme.workspace = true
description = """Provides the tracing functionality for the hyperlight guest."""

[dependencies]
hyperlight-common = { workspace = true, default-features = false, features = ["trace_guest"] }
hyperlight-common = { workspace = true, default-features = false }
hyperlight-guest-tracing-macro = { workspace = true }
spin = "0.10.0"

[lints]
workspace = true

[features]
default = []
trace = [ "hyperlight-guest-tracing-macro/trace", "hyperlight-common/trace_guest" ]
Loading
Loading