diff --git a/spl/Cargo.toml b/spl/Cargo.toml index d3a2e49bb..7f8aa3d03 100644 --- a/spl/Cargo.toml +++ b/spl/Cargo.toml @@ -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"] } diff --git a/spl/src/lib.rs b/spl/src/lib.rs index 082c491b0..526ee2eb6 100644 --- a/spl/src/lib.rs +++ b/spl/src/lib.rs @@ -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;