From ca0e32efb1e5b9eba157e9fd2eef178d9367c578 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Thu, 11 Dec 2025 14:45:23 -0500 Subject: [Rust] Restructure type APIs into `types` module This helps with documentation, giving a single module for those working with types to find related APIs Also split out enumeration and structure APIs into their own file, since they have their own backing data separate from `Type`. --- rust/examples/bndb_to_type_library.rs | 3 +-- rust/examples/create_type_library.rs | 3 +-- rust/examples/dump_type_library.rs | 4 ++-- rust/examples/type_printer.rs | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) (limited to 'rust/examples') diff --git a/rust/examples/bndb_to_type_library.rs b/rust/examples/bndb_to_type_library.rs index 40a184ca..84515cf7 100644 --- a/rust/examples/bndb_to_type_library.rs +++ b/rust/examples/bndb_to_type_library.rs @@ -1,8 +1,7 @@ // Usage: cargo run --example bndb_to_type_library use binaryninja::binary_view::BinaryViewExt; -use binaryninja::type_library::TypeLibrary; -use binaryninja::types::QualifiedName; +use binaryninja::types::{QualifiedName, TypeLibrary}; fn main() { let bndb_path_str = std::env::args().nth(1).expect("No header provided"); diff --git a/rust/examples/create_type_library.rs b/rust/examples/create_type_library.rs index 35e9b11c..74d93765 100644 --- a/rust/examples/create_type_library.rs +++ b/rust/examples/create_type_library.rs @@ -1,8 +1,7 @@ // Usage: cargo run --example create_type_library use binaryninja::platform::Platform; -use binaryninja::type_library::TypeLibrary; -use binaryninja::type_parser::{CoreTypeParser, TypeParser}; +use binaryninja::types::{CoreTypeParser, TypeLibrary, TypeParser}; fn main() { let header_path_str = std::env::args().nth(1).expect("No header provided"); diff --git a/rust/examples/dump_type_library.rs b/rust/examples/dump_type_library.rs index 34ca1baf..f7398d28 100644 --- a/rust/examples/dump_type_library.rs +++ b/rust/examples/dump_type_library.rs @@ -2,8 +2,8 @@ use binaryninja::binary_view::BinaryView; use binaryninja::file_metadata::FileMetadata; -use binaryninja::type_library::TypeLibrary; -use binaryninja::type_printer::{CoreTypePrinter, TokenEscapingType}; +use binaryninja::types::library::TypeLibrary; +use binaryninja::types::printer::{CoreTypePrinter, TokenEscapingType}; fn main() { let type_lib_str = std::env::args().nth(1).expect("No type library provided"); diff --git a/rust/examples/type_printer.rs b/rust/examples/type_printer.rs index 846e1a09..b88a0233 100644 --- a/rust/examples/type_printer.rs +++ b/rust/examples/type_printer.rs @@ -1,4 +1,4 @@ -use binaryninja::type_printer::{CoreTypePrinter, TokenEscapingType}; +use binaryninja::types::printer::{CoreTypePrinter, TokenEscapingType}; use binaryninja::types::{MemberAccess, MemberScope, Structure, StructureMember, Type}; fn main() { -- cgit v1.3.1