File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,17 @@ edition = "2021"
6
6
7
7
[features ]
8
8
noexports = []
9
+ derive = [" binaryninja-derive" , " elain" ]
9
10
10
11
[dependencies ]
11
12
lazy_static = " 1.4.0"
12
13
log = " 0.4"
13
14
libc = " 0.2"
14
15
rayon = { version = " 1.8" , optional = true }
15
16
binaryninjacore-sys = { path = " binaryninjacore-sys" }
16
- binaryninja-derive = { path = " binaryninja-derive" }
17
- elain = " 0.3.0"
17
+ binaryninja-derive = { path = " binaryninja-derive" , optional = true }
18
+ # Const-generic alignment gadgetry used by the `AbstractType` derive macro
19
+ elain = { version = " 0.3.0" , optional = true }
18
20
19
21
[patch .crates-io ]
20
22
# Patched pdb crate to implement some extra structures
Original file line number Diff line number Diff line change @@ -169,6 +169,7 @@ use std::path::PathBuf;
169
169
pub use binaryninjacore_sys:: BNBranchType as BranchType ;
170
170
pub use binaryninjacore_sys:: BNEndianness as Endianness ;
171
171
use binaryview:: BinaryView ;
172
+ #[ cfg( feature = "derive" ) ]
172
173
pub use elain;
173
174
use metadata:: Metadata ;
174
175
use metadata:: MetadataType ;
Original file line number Diff line number Diff line change @@ -691,6 +691,7 @@ impl Drop for TypeBuilder {
691
691
//////////
692
692
// Type
693
693
694
+ #[ cfg( feature = "derive" ) ]
694
695
pub use binaryninja_derive:: * ;
695
696
pub trait AbstractType : Sized {
696
697
const SIZE : usize = std:: mem:: size_of :: < Self > ( ) ;
You can’t perform that action at this time.
0 commit comments