summaryrefslogtreecommitdiff
path: root/rust/src/types
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2026-03-04 15:54:50 -0500
committerGlenn Smith <glenn@vector35.com>2026-03-04 15:54:50 -0500
commit3520262824637979418554656607433424896809 (patch)
treeb9f3c29f78729c6a7050a8131395bb5e54d9e861 /rust/src/types
parent9b03ef651f59a714b45f072d359edd0905d04925 (diff)
Add TypeLibrary::Register, to allow loading type libraries from script
Diffstat (limited to 'rust/src/types')
-rw-r--r--rust/src/types/library.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/rust/src/types/library.rs b/rust/src/types/library.rs
index ab69e76e..8743b896 100644
--- a/rust/src/types/library.rs
+++ b/rust/src/types/library.rs
@@ -217,6 +217,11 @@ impl TypeLibrary {
unsafe { BNFinalizeTypeLibrary(self.as_raw()) }
}
+ /// Make a created or loaded Type Library available for Platforms to use when loading binaries.
+ pub fn register(&self) {
+ unsafe { BNRegisterTypeLibrary(self.as_raw()) }
+ }
+
/// Retrieves the metadata associated with the given key stored in the type library.
pub fn query_metadata(&self, key: &str) -> Option<Ref<Metadata>> {
let key = key.to_cstr();