[package]
name = "solana-sbf-programs"
documentation = "https://docs.rs/solana"
readme = "README.md"
publish = false
version = { workspace = true }
authors = { workspace = true }
description = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
edition = { workspace = true }

[workspace]
members = [
    "rust/128bit",
    "rust/128bit_dep",
    "rust/account_mem",
    "rust/account_mem_deprecated",
    "rust/alloc",
    "rust/alt_bn128",
    "rust/alt_bn128_compression",
    "rust/big_mod_exp",
    "rust/call_args",
    "rust/call_depth",
    "rust/caller_access",
    "rust/curve25519",
    "rust/custom_heap",
    "rust/dep_crate",
    "rust/deprecated_loader",
    "rust/divide_by_zero",
    "rust/dup_accounts",
    "rust/error_handling",
    "rust/external_spend",
    "rust/get_minimum_delegation",
    "rust/inner_instruction_alignment_check",
    "rust/instruction_introspection",
    "rust/invoke",
    "rust/invoke_and_error",
    "rust/invoke_and_ok",
    "rust/invoke_and_return",
    "rust/invoked",
    "rust/iter",
    "rust/log_data",
    "rust/many_args",
    "rust/many_args_dep",
    "rust/mem",
    "rust/mem_dep",
    "rust/membuiltins",
    "rust/noop",
    "rust/panic",
    "rust/param_passing",
    "rust/param_passing_dep",
    "rust/poseidon",
    "rust/r2_instruction_data_pointer",
    "rust/rand",
    "rust/realloc",
    "rust/realloc_invoke",
    "rust/remaining_compute_units",
    "rust/ro_account_modify",
    "rust/ro_modify",
    "rust/sanity",
    "rust/secp256k1_recover",
    "rust/sha",
    "rust/sibling_inner_instructions",
    "rust/sibling_instructions",
    "rust/simulation",
    "rust/spoof1",
    "rust/spoof1_system",
    "rust/syscall-get-epoch-stake",
    "rust/sysvar",
    "rust/upgradeable",
    "rust/upgraded",
]
[workspace.package]
version = "4.0.0-alpha.0"
description = "Solana SBF test program written in Rust"
authors = ["Anza Maintainers <maintainers@anza.xyz>"]
repository = "https://github.com/anza-xyz/agave"
homepage = "https://anza.xyz"
license = "Apache-2.0"
edition = "2021"

[workspace.lints.rust.unexpected_cfgs]
level = "warn"
check-cfg = [
    'cfg(target_os, values("solana"))',
    'cfg(feature, values("custom-panic", "custom-heap"))',
    'cfg(target_feature, values("dynamic-frames"))',
]

[workspace.dependencies]
agave-feature-set = { path = "../../feature-set", version = "=4.0.0-alpha.0" }
agave-logger = { path = "../../logger", version = "=4.0.0-alpha.0" }
agave-reserved-account-keys = { path = "../../reserved-account-keys", version = "=4.0.0-alpha.0" }
agave-syscalls = { path = "../../syscalls", version = "=4.0.0-alpha.0" }
agave-validator = { path = "../../validator", version = "=4.0.0-alpha.0" }
array-bytes = "=1.4.1"
bincode = { version = "1.1.4", default-features = false }
blake3 = "1.0.0"
borsh = "1.5.1"
byteorder = "1.3.2"
elf = "0.0.10"
getrandom = "0.2.10"
itertools = "0.13.0"
libsecp256k1 = { version = "0.7.0", default-features = false }
log = "0.4.11"
miow = "0.3.6"
net2 = "0.2.37"
num-derive = "0.4.2"
num-traits = "0.2"
rand = "0.8"
serde = { version = "1.0.112", features = ["derive"] }
serde_json = "1.0.56"
sha2 = "0.10.8"
sha3 = "0.10.8"
solana-account-decoder = { path = "../../account-decoder", version = "=4.0.0-alpha.0" }
solana-account-info = "=3.0.0"
solana-accounts-db = { path = "../../accounts-db", version = "=4.0.0-alpha.0" }
solana-big-mod-exp = "=3.0.0"
solana-blake3-hasher = { version = "=3.0.0", features = ["blake3"] }
solana-bn254 = "=3.1.2"
solana-bpf-loader-program = { path = "../bpf_loader", version = "=4.0.0-alpha.0" }
solana-cli-output = { path = "../../cli-output", version = "=4.0.0-alpha.0" }
solana-clock = { version = "=3.0.0", features = ["serde", "sysvar"] }
solana-compute-budget = { path = "../../compute-budget", version = "=4.0.0-alpha.0" }
solana-compute-budget-instruction = { path = "../../compute-budget-instruction", version = "=4.0.0-alpha.0" }
solana-cpi = "=3.0.0"
solana-curve25519 = { path = "../../curves/curve25519", version = "=4.0.0-alpha.0" }
solana-define-syscall = "=3.0.0"
solana-fee = { path = "../../fee", version = "=4.0.0-alpha.0" }
solana-hash = { version = "=3.0.0", features = ["bytemuck", "serde", "std"] }
solana-instruction = "=3.0.0"
solana-instructions-sysvar = "=3.0.0"
solana-keccak-hasher = { version = "=3.0.0", features = ["sha3"] }
solana-ledger = { path = "../../ledger", version = "=4.0.0-alpha.0" }
solana-measure = { path = "../../measure", version = "=4.0.0-alpha.0" }
solana-msg = "=3.0.0"
solana-poseidon = { path = "../../poseidon/", version = "=4.0.0-alpha.0" }
solana-program = "=3.0.0"
solana-program-entrypoint = "=3.1.0"
solana-program-error = "=3.0.0"
solana-program-memory = "=3.0.0"
solana-program-runtime = { path = "../../program-runtime", version = "=4.0.0-alpha.0" }
solana-pubkey = { version = "=3.0.0", default-features = false }
solana-runtime = { path = "../../runtime", version = "=4.0.0-alpha.0" }
solana-runtime-transaction = { path = "../../runtime-transaction", version = "=4.0.0-alpha.0" }
solana-sbf-rust-128bit-dep = { path = "rust/128bit_dep", version = "=4.0.0-alpha.0" }
solana-sbf-rust-invoke-dep = { path = "rust/invoke_dep", version = "=4.0.0-alpha.0" }
solana-sbf-rust-invoked-dep = { path = "rust/invoked_dep", version = "=4.0.0-alpha.0" }
solana-sbf-rust-many-args-dep = { path = "rust/many_args_dep", version = "=4.0.0-alpha.0" }
solana-sbf-rust-mem-dep = { path = "rust/mem_dep", version = "=4.0.0-alpha.0" }
solana-sbf-rust-param-passing-dep = { path = "rust/param_passing_dep", version = "=4.0.0-alpha.0" }
solana-sbf-rust-r2-instruction-data-pointer = { path = "rust/r2_instruction_data_pointer", version = "=4.0.0-alpha.0" }
solana-sbf-rust-realloc-dep = { path = "rust/realloc_dep", version = "=4.0.0-alpha.0" }
solana-sbf-rust-realloc-invoke-dep = { path = "rust/realloc_invoke_dep", version = "=4.0.0-alpha.0" }
solana-sbpf = "=0.13.1"
solana-sdk-ids = "=3.0.0"
solana-secp256k1-recover = "=3.0.0"
solana-sha256-hasher = { version = "=3.0.1", features = ["sha2"] }
solana-stake-interface = { version = "=2.0.1", features = ["bincode"] }
solana-svm = { path = "../../svm", version = "=4.0.0-alpha.0" }
solana-svm-callback = { path = "../../svm-callback", version = "=4.0.0-alpha.0" }
solana-svm-feature-set = { path = "../../svm-feature-set", version = "=4.0.0-alpha.0" }
solana-svm-log-collector = { path = "../../svm-log-collector", version = "=4.0.0-alpha.0" }
solana-svm-test-harness = { path = "../../svm-test-harness", version = "=4.0.0-alpha.0" }
solana-svm-timings = { path = "../../svm-timings", version = "=4.0.0-alpha.0" }
solana-svm-transaction = { path = "../../svm-transaction", version = "=4.0.0-alpha.0" }
solana-svm-type-overrides = { path = "../../svm-type-overrides", version = "=4.0.0-alpha.0" }
solana-system-interface = { version = "=2.0", features = ["bincode"] }
solana-sysvar = "=3.0.0"
solana-transaction-context = { path = "../../transaction-context", version = "=4.0.0-alpha.0" }
solana-transaction-status = { path = "../../transaction-status", version = "=4.0.0-alpha.0" }
solana-vote = { path = "../../vote", version = "=4.0.0-alpha.0" }
solana-vote-program = { path = "../../programs/vote", version = "=4.0.0-alpha.0" }
test-case = "3.3.1"
thiserror = "1.0"

[features]
sbf_c = []
sbf_rust = []
sbf_sanity_list = []
dummy-for-ci-check = ["sbf_c", "sbf_rust", "sbf_sanity_list"]
# This was needed for ci
frozen-abi = []

[dev-dependencies]
agave-feature-set = { workspace = true }
agave-logger = { workspace = true }
agave-reserved-account-keys = { workspace = true }
agave-syscalls = { workspace = true }
agave-validator = { workspace = true }
bincode = { workspace = true }
borsh = { workspace = true }
byteorder = { workspace = true }
elf = { workspace = true }
itertools = { workspace = true }
log = { workspace = true }
miow = { workspace = true }
net2 = { workspace = true }
solana-account = "3.2.0"
solana-account-decoder = { workspace = true }
solana-account-info = "3.0.0"
solana-accounts-db = { workspace = true }
solana-bpf-loader-program = { workspace = true }
solana-cli-output = { workspace = true }
solana-client-traits = "3.0.0"
solana-clock = "3.0.0"
solana-cluster-type = "3.0.0"
solana-compute-budget = { workspace = true }
solana-compute-budget-instruction = { workspace = true, features = [
    "dev-context-only-utils",
] }
solana-compute-budget-interface = "3.0.0"
solana-fee = { workspace = true }
solana-fee-calculator = "3.0.0"
solana-fee-structure = "3.0.0"
solana-genesis-config = "3.0.0"
solana-hash = "3.0.0"
solana-instruction = "3.0.0"
solana-keypair = "3.0.0"
solana-ledger = { workspace = true }
solana-loader-v3-interface = "6.1.0"
solana-loader-v4-interface = "3.1.0"
solana-measure = { workspace = true }
solana-message = "3.0.0"
solana-program = { workspace = true }
solana-program-entrypoint = "3.1.0"
solana-program-runtime = { workspace = true }
solana-pubkey = "3.0.0"
solana-rent = "3.0.0"
solana-runtime = { workspace = true, features = ["dev-context-only-utils"] }
solana-runtime-transaction = { workspace = true, features = [
    "dev-context-only-utils",
] }
solana-sbf-rust-invoke-dep = { workspace = true }
solana-sbf-rust-realloc-dep = { workspace = true }
solana-sbf-rust-realloc-invoke-dep = { workspace = true }
solana-sbpf = { workspace = true, features = ["jit"] }
solana-sdk-ids = "3.0.0"
solana-signer = "3.0.0"
solana-stake-interface = "2.0.1"
solana-svm = { workspace = true }
solana-svm-callback = { workspace = true }
solana-svm-feature-set = { workspace = true }
solana-svm-log-collector = { workspace = true }
solana-svm-test-harness = { workspace = true }
solana-svm-timings = { workspace = true }
solana-svm-transaction = { workspace = true }
solana-svm-type-overrides = { workspace = true }
solana-system-interface = "2.0"
solana-sysvar = "3.0.0"
solana-transaction = "3.0.0"
solana-transaction-context = { workspace = true, features = [
    "dev-context-only-utils",
] }
solana-transaction-error = "3.0.0"
solana-transaction-status = { workspace = true }
solana-vote = { workspace = true }
solana-vote-program = { workspace = true }
test-case = { workspace = true }

[profile.release]
# The test programs are build in release mode
# Minimize their file size so that they fit into the account size limit
strip = true

[[bench]]
name = "bpf_loader"

[patch.crates-io]
# We include the following crates as our dependencies from crates.io:
#
#  * spl-associated-token-account-interface
#  * spl-instruction-padding
#  * spl-memo-interface
#  * spl-pod
#  * spl-token
#  * spl-token-2022-interface
#  * spl-token-metadata-interface
#
# They are included indirectly, for example, `account-decoder` depends on
#
#     solana-sdk = { workspace = true }
#
# and that is specified as
#
#     spl-token = "=3.5.0"
#
# in `../../Cargo.toml`.
#
# `spl-token`, in turn, depends on `solana-program`, which we explicitly specify
# above as a local path dependency:
#
#     solana-program = { path = "../../sdk/program", version = "=1.16.0" }
#
# Unfortunately, Cargo will try to resolve the `spl-token` `solana-program`
# dependency only using what is available on crates.io.  Crates.io normally
# contains a previous version of these crates, and we end up with two versions
# of `solana-program` and `solana-zk-token-sdk` and all of their dependencies in
# our build tree.
#
# If you are developing downstream using non-crates-io solana-program (local or
# forked repo, or from github rev, eg), duplicate the following patch statements
# in your Cargo.toml. If you still hit duplicate-type errors with the patch
# statements in place, run `cargo update -p solana-program` and/or `cargo update
# -p solana-zk-token-sdk` to remove extraneous versions from your Cargo.lock
# file.
#
# There is a similar override in `../../Cargo.toml`.  Please keep both comments
# and the overrides in sync.
solana-curve25519 = { path = "../../curves/curve25519" }
