From 8fbf9ca9c0c32c600008dc6d85cacf84276736f8 Mon Sep 17 00:00:00 2001 From: Brandon Miller Date: Fri, 22 May 2026 15:44:53 -0400 Subject: Rust APIs for custom function lifters --- rust/src/logger.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'rust/src/logger.rs') diff --git a/rust/src/logger.rs b/rust/src/logger.rs index 66e594fd..d2903a5a 100644 --- a/rust/src/logger.rs +++ b/rust/src/logger.rs @@ -57,6 +57,14 @@ impl Logger { Self::new_with_session(name, LOGGER_DEFAULT_SESSION_ID) } + pub fn ref_from_raw(handle: *mut BNLogger) -> Ref { + unsafe { + Ref::new(Logger { + handle: NonNull::new(handle).unwrap(), + }) + } + } + /// Create a logger scoped with the specific [`SessionId`], hiding the logs when the session /// is not active in the UI. /// -- cgit v1.3.1