Skip to content

Print only in debug from Rust host - #190

Merged
Soham Das (SohamDas2021) merged 1 commit into
mainfrom
printOnlyInDebugRust
Jan 27, 2026
Merged

Soham Das (SohamDas2021) merged 1 commit into
mainfrom
printOnlyInDebugRust

Conversation

@SohamDas2021

Copy link
Copy Markdown
Collaborator

Add debug_print! macro to Rust SDK host that conditionally compiles debug output only in debug builds

Comment on lines +9 to +19
/// Debug print macro that only prints in debug builds.
/// Similar to C++ `#ifdef _VEIL_INTERNAL_DEBUG` pattern.
macro_rules! debug_print {
($($arg:tt)*) => {
#[cfg(debug_assertions)]
{
println!($($arg)*);
}
};
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want to move these down past the use statements in the future. Just for maintainability purposes.

@SohamDas2021
Soham Das (SohamDas2021) merged commit f6f80d8 into main Jan 27, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants