Cargo Features

[dependencies]
light-sdk-types = { version = "0.23.0", default-features = false, features = ["std", "alloc", "keccak", "sha256", "token", "anchor", "idl-build", "v2", "cpi-context", "light-account", "poseidon"] }
default = std, v2

These default features are set whenever light-sdk-types is added without default-features = false somewhere in the dependency tree.

std default = alloc, solana-msg

Enables std of light-compressed-account

Affects light_account::LightAccount.pack, pack::Pack, light-sdk-types::pack_accounts

alloc std

Enables alloc of light-compressed-account

Affects account_info::CompressedAccountInfoTrait.input_compressed_account, account_info::CompressedAccountInfoTrait.output_compressed_account, light-sdk-types::interface

keccak

Enables keccak of light-hasher

sha256

Enables sha256 of light-compressed-account and light-hasher

token light-account?

Enables light-token-interface

Affects account::token_seeds, cpi::create_mints, cpi::create_token_accounts, decompression::create_token_account, decompression::token, processor::DecompressCtx.ctoken_rent_sponsor, processor::DecompressCtx.ctoken_compressible_config, processor::DecompressCtx.in_token_data, processor::DecompressCtx.in_tlv, processor::DecompressCtx.token_seeds, processor::process_decompress_accounts_idempotent, variant::PackedLightAccountVariantTrait.into_in_token_data, variant::PackedLightAccountVariantTrait.into_in_tlv, variant::PackedLightAccountVariantTrait.derive_owner

anchor idl-build? = anchor-lang, solana-program-error

Enables anchor of light-compressed-account, light-compressible, and optional light-token-interface

idl-build = anchor

Enables idl-build of anchor-lang ^0.31.1, light-compressible, and optional light-token-interface

v2 default

Affects cpi_accounts::v2, light-sdk-types::interface

cpi-context light-account?

Affects create_mints::CreateMints, invoke::invoke_write_pdas_to_cpi_context

light-account = cpi-context, token

Affects accounts::create_accounts

poseidon

Enables poseidon of light-compressed-account and light-hasher

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

anchor-lang anchor? idl-build?

Enables anchor-lang ^0.31.1

solana-msg std

Enables solana-msg ^2.2

solana-program-error anchor?

Enables solana-program-error ^2.2