[package]
name = "solana-perf"
description = "Solana Performance APIs"
documentation = "https://docs.rs/solana-perf"
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"]

[lib]
name = "solana_perf"

[features]
agave-unstable-api = []
dev-context-only-utils = [
    "dep:solana-clock",
    "dep:solana-keypair",
    "dep:solana-signer",
    "dep:solana-system-interface",
    "dep:solana-system-transaction",
    "dep:solana-transaction",
    "dep:solana-vote-program",
    "dep:solana-vote",
]
frozen-abi = [
    "dep:solana-frozen-abi",
    "dep:solana-frozen-abi-macro",
    "solana-short-vec/frozen-abi",
    "solana-vote-program/frozen-abi",
]

[dependencies]
ahash = { workspace = true }
bincode = { workspace = true }
bv = { workspace = true, features = ["serde"] }
bytes = { workspace = true, features = ["serde"] }
curve25519-dalek = { workspace = true }
dlopen2 = { workspace = true }
fnv = { workspace = true }
log = { workspace = true }
rand = { workspace = true }
rayon = { workspace = true }
serde = { workspace = true }
solana-clock = { workspace = true, optional = true }
solana-frozen-abi = { workspace = true, optional = true, features = [
    "frozen-abi",
] }
solana-frozen-abi-macro = { workspace = true, optional = true, features = [
    "frozen-abi",
] }
solana-hash = { workspace = true }
solana-keypair = { workspace = true, optional = true }
solana-message = { workspace = true }
solana-metrics = { workspace = true }
solana-packet = { workspace = true, features = ["bincode"] }
solana-pubkey = { workspace = true, default-features = false }
solana-rayon-threadlimit = { workspace = true }
solana-sdk-ids = { workspace = true }
solana-short-vec = { workspace = true }
solana-signature = { workspace = true, features = ["verify"] }
solana-signer = { workspace = true, optional = true }
solana-system-interface = { workspace = true, optional = true }
solana-system-transaction = { workspace = true, optional = true }
solana-time-utils = { workspace = true }
solana-transaction = { workspace = true, optional = true }
solana-transaction-context = { workspace = true }
solana-vote = { workspace = true, optional = true }
solana-vote-program = { workspace = true, optional = true }

[target."cfg(target_os = \"linux\")".dependencies]
caps = { workspace = true }
libc = { workspace = true }
nix = { workspace = true, features = ["user"] }

[dev-dependencies]
agave-logger = { workspace = true }
assert_matches = { workspace = true }
bencher = { workspace = true }
rand_chacha = { workspace = true }
solana-perf = { path = ".", features = ["agave-unstable-api", "dev-context-only-utils"] }
test-case = { workspace = true }

[target.'cfg(not(any(target_env = "msvc", target_os = "freebsd")))'.dev-dependencies]
jemallocator = { workspace = true }

[[bench]]
name = "dedup"
harness = false

[[bench]]
name = "recycler"
harness = false

[[bench]]
name = "reset"
harness = false

[[bench]]
name = "shrink"
harness = false

[[bench]]
name = "sigverify"
harness = false

[[bench]]
name = "discard"
harness = false

[lints.rust.unexpected_cfgs]
level = "warn"
check-cfg = ['cfg(build_target_feature_avx)', 'cfg(build_target_feature_avx2)']
