spl: Feature gate modules and only enable token, mint, and associated token by default (#973)
This commit is contained in:
parent
2758e8d6c4
commit
54f24e5596
|
@ -7,12 +7,17 @@ license = "Apache-2.0"
|
|||
description = "CPI clients for SPL programs"
|
||||
|
||||
[features]
|
||||
default = ["mint", "token", "associated_token"]
|
||||
mint = []
|
||||
token = []
|
||||
associated_token = []
|
||||
governance = []
|
||||
shmem = []
|
||||
devnet = []
|
||||
|
||||
[dependencies]
|
||||
anchor-lang = { path = "../lang", version = "0.18.0", features = ["derive"] }
|
||||
lazy_static = "1.4.0"
|
||||
serum_dex = { git = "https://github.com/project-serum/serum-dex", rev = "1be91f2", version = "0.4.0", features = ["no-entrypoint"] }
|
||||
serum_dex = { git = "https://github.com/project-serum/serum-dex", rev = "1be91f2", version = "0.4.0", features = ["no-entrypoint"], optional = true}
|
||||
solana-program = "1.8.0"
|
||||
spl-token = { version = "3.1.1", features = ["no-entrypoint"] }
|
||||
spl-associated-token-account = { version = "1.0.3", features = ["no-entrypoint"] }
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
#[cfg(feature = "associated_token")]
|
||||
pub mod associated_token;
|
||||
pub mod dex;
|
||||
pub mod governance;
|
||||
|
||||
#[cfg(feature = "mint")]
|
||||
pub mod mint;
|
||||
pub mod shmem;
|
||||
|
||||
#[cfg(feature = "token")]
|
||||
pub mod token;
|
||||
|
||||
#[cfg(feature = "serum_dex")]
|
||||
pub mod dex;
|
||||
|
||||
#[cfg(feature = "governance")]
|
||||
pub mod governance;
|
||||
|
||||
#[cfg(feature = "shmem")]
|
||||
pub mod shmem;
|
||||
|
|
Loading…
Reference in New Issue