File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,13 @@ unexpected_cfgs = { level = "warn", check-cfg = [
1919
2020[features ]
2121copy = [" solana-account-view/copy" , " solana-address/copy" ]
22+ cpi = [" dep:solana-instruction-view" ]
2223std = [" solana-address/std" ]
2324
2425[dependencies ]
2526solana-account-view = { workspace = true }
2627solana-address = { workspace = true , features = [" syscalls" ] }
27- solana-instruction-view = { workspace = true , features = [" cpi" ] }
28+ solana-instruction-view = { workspace = true , features = [" cpi" ], optional = true }
2829solana-program-error = { workspace = true }
2930
3031[dev-dependencies ]
Original file line number Diff line number Diff line change @@ -243,7 +243,8 @@ pub use solana_address as address;
243243pub use solana_address:: Address ;
244244
245245// Re-export the `solana_instruction_view` for downstream use.
246- pub use solana_instruction_view as instruction;
246+ #[ cfg( feature = "cpi" ) ]
247+ pub use { solana_instruction_view as instruction, solana_instruction_view:: cpi} ;
247248
248249// Re-export the `solana_program_error` for downstream use.
249250pub use solana_program_error as error;
Original file line number Diff line number Diff line change 11use core:: { marker:: PhantomData , mem:: size_of, ops:: Deref } ;
22
3+ #[ cfg( feature = "cpi" ) ]
4+ use crate :: instruction:: AccountRole ;
35use crate :: {
46 account:: { AccountView , Ref } ,
57 address:: ADDRESS_BYTES ,
68 error:: ProgramError ,
7- instruction:: AccountRole ,
89 Address ,
910} ;
1011
@@ -242,6 +243,7 @@ impl IntrospectedAccountRole {
242243 ( self . flags & IS_SIGNER ) != 0
243244 }
244245
246+ #[ cfg( feature = "cpi" ) ]
245247 /// Convert the `IntrospectedAccountRole` to an `AccountRole`.
246248 #[ inline( always) ]
247249 pub fn to_account_role ( & self ) -> AccountRole {
You can’t perform that action at this time.
0 commit comments