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"
66
77[features ]
88noexports = []
9+ derive = [" binaryninja-derive" , " elain" ]
910
1011[dependencies ]
1112lazy_static = " 1.4.0"
1213log = " 0.4"
1314libc = " 0.2"
1415rayon = { version = " 1.8" , optional = true }
1516binaryninjacore-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 }
1820
1921[patch .crates-io ]
2022# 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;
169169pub use binaryninjacore_sys:: BNBranchType as BranchType ;
170170pub use binaryninjacore_sys:: BNEndianness as Endianness ;
171171use binaryview:: BinaryView ;
172+ #[ cfg( feature = "derive" ) ]
172173pub use elain;
173174use metadata:: Metadata ;
174175use metadata:: MetadataType ;
Original file line number Diff line number Diff line change @@ -691,6 +691,7 @@ impl Drop for TypeBuilder {
691691//////////
692692// Type
693693
694+ #[ cfg( feature = "derive" ) ]
694695pub use binaryninja_derive:: * ;
695696pub trait AbstractType : Sized {
696697 const SIZE : usize = std:: mem:: size_of :: < Self > ( ) ;
You can’t perform that action at this time.
0 commit comments