summaryrefslogtreecommitdiff
path: root/rust/src/architecture
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-12-17 21:23:46 -0500
committerMason Reed <35282038+emesare@users.noreply.github.com>2026-01-11 10:36:01 -0800
commit168a3fd34824adc9c6a606cd144219701f15cccf (patch)
tree9bbac31ece5ea6ab6627998d995a77f7f7e2f8e6 /rust/src/architecture
parentca91bc1933976c62d24248f0f7c35af38451ff11 (diff)
[Rust] Replace `log` with `tracing`
- Added more documentation - Replaced global named logger for plugins, fixing the issue when the CU has multiple (e.g. statically linked demo) - Simplified some misc code This is a breaking change, but I believe there is no better time to make it, we cannot continue to use the `log` crate, it is too limited for our needs.
Diffstat (limited to 'rust/src/architecture')
-rw-r--r--rust/src/architecture/flag.rs8
-rw-r--r--rust/src/architecture/intrinsic.rs2
-rw-r--r--rust/src/architecture/register.rs4
3 files changed, 7 insertions, 7 deletions
diff --git a/rust/src/architecture/flag.rs b/rust/src/architecture/flag.rs
index 7c0f5deb..4cbd2dc1 100644
--- a/rust/src/architecture/flag.rs
+++ b/rust/src/architecture/flag.rs
@@ -9,11 +9,11 @@ use std::hash::Hash;
pub use binaryninjacore_sys::BNFlagRole as FlagRole;
pub use binaryninjacore_sys::BNLowLevelILFlagCondition as FlagCondition;
-crate::new_id_type!(FlagId, u32);
+new_id_type!(FlagId, u32);
// TODO: Make this NonZero<u32>?
-crate::new_id_type!(FlagWriteId, u32);
-crate::new_id_type!(FlagClassId, u32);
-crate::new_id_type!(FlagGroupId, u32);
+new_id_type!(FlagWriteId, u32);
+new_id_type!(FlagClassId, u32);
+new_id_type!(FlagGroupId, u32);
pub trait Flag: Debug + Sized + Clone + Copy + Hash + Eq {
type FlagClass: FlagClass;
diff --git a/rust/src/architecture/intrinsic.rs b/rust/src/architecture/intrinsic.rs
index 5d9827a1..a00b1e79 100644
--- a/rust/src/architecture/intrinsic.rs
+++ b/rust/src/architecture/intrinsic.rs
@@ -11,7 +11,7 @@ use std::borrow::Cow;
use std::ffi::CStr;
use std::fmt::{Debug, Formatter};
-crate::new_id_type!(IntrinsicId, u32);
+new_id_type!(IntrinsicId, u32);
pub trait Intrinsic: Debug + Sized + Clone + Copy {
fn name(&self) -> Cow<'_, str>;
diff --git a/rust/src/architecture/register.rs b/rust/src/architecture/register.rs
index 1f17c785..0f760844 100644
--- a/rust/src/architecture/register.rs
+++ b/rust/src/architecture/register.rs
@@ -6,7 +6,7 @@ use std::ffi::CStr;
use std::fmt::{Debug, Formatter};
use std::hash::Hash;
-crate::new_id_type!(RegisterId, u32);
+new_id_type!(RegisterId, u32);
impl RegisterId {
pub fn is_temporary(&self) -> bool {
@@ -14,7 +14,7 @@ impl RegisterId {
}
}
-crate::new_id_type!(RegisterStackId, u32);
+new_id_type!(RegisterStackId, u32);
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum ImplicitRegisterExtend {