[package]
name = "solana-transaction-context"
description = "Solana data shared between program runtime and built-in programs as well as SBF programs."
documentation = "https://docs.rs/solana-transaction-context"
version = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
edition = { workspace = true }

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
all-features = true
rustdoc-args = ["--cfg=docsrs"]

[features]
agave-unstable-api = []
bincode = ["dep:bincode", "serde", "solana-account/bincode"]
dev-context-only-utils = ["bincode", "solana-account/dev-context-only-utils", "dep:qualifier_attr"]
serde = ["serde/derive"]

[dependencies]
qualifier_attr = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
solana-account = { workspace = true }
solana-instruction = { workspace = true, features = ["std"] }
solana-instructions-sysvar = { workspace = true }
solana-pubkey = { workspace = true }
solana-sbpf = { workspace = true }

[target.'cfg(not(target_os = "solana"))'.dependencies]
bincode = { workspace = true, optional = true }
solana-rent = { workspace = true }
solana-sdk-ids = { workspace = true }
solana-signature = { workspace = true, optional = true }

[dev-dependencies]
solana-account-info = { workspace = true }
solana-program-entrypoint = { workspace = true }
solana-system-interface = { workspace = true }
solana-transaction-context = { path = ".", features = [
    "agave-unstable-api",
    "dev-context-only-utils",
] }
static_assertions = { workspace = true }

[lints]
workspace = true
