[workspace.package]
version = "1.17.13"
description = "Solana SBF test program written in Rust"
authors = ["Solana Labs Maintainers <maintainers@solanalabs.com>"]
repository = "https://github.com/solana-labs/solana"
homepage = "https://solanalabs.com/"
license = "Apache-2.0"
edition = "2021"

[workspace.dependencies]
array-bytes = "=1.4.1"
bincode = { version = "1.1.4", default-features = false }
blake3 = "1.0.0"
byteorder = "1.3.2"
elf = "0.0.10"
getrandom = "0.2.10"
itertools = "0.10.1"
libsecp256k1 = { version = "0.7.0", default-features = false }
log = "0.4.11"
miow = "0.3.6"
net2 = "0.2.37"
num-derive = "0.3"
num-traits = "0.2"
rand = "0.8"
rustversion = "1.0.14"
serde = "1.0.112"
serde_json = "1.0.56"
solana_rbpf = "=0.8.0"
solana-account-decoder = { path = "../../account-decoder", version = "=1.17.13" }
solana-accounts-db = { path = "../../accounts-db", version = "=1.17.13" }
solana-bpf-loader-program = { path = "../bpf_loader", version = "=1.17.13" }
solana-cli-output = { path = "../../cli-output", version = "=1.17.13" }
solana-ledger = { path = "../../ledger", version = "=1.17.13" }
solana-logger = { path = "../../logger", version = "=1.17.13" }
solana-measure = { path = "../../measure", version = "=1.17.13" }
solana-program = { path = "../../sdk/program", version = "=1.17.13" }
solana-program-runtime = { path = "../../program-runtime", version = "=1.17.13" }
solana-program-test = { path = "../../program-test", version = "=1.17.13" }
solana-runtime = { path = "../../runtime", version = "=1.17.13" }
solana-sbf-rust-128bit-dep = { path = "rust/128bit_dep", version = "=1.17.13" }
solana-sbf-rust-invoke = { path = "rust/invoke", version = "=1.17.13" }
solana-sbf-rust-invoked = { path = "rust/invoked", version = "=1.17.13", default-features = false }
solana-sbf-rust-many-args-dep = { path = "rust/many_args_dep", version = "=1.17.13" }
solana-sbf-rust-mem = { path = "rust/mem", version = "=1.17.13" }
solana-sbf-rust-param-passing-dep = { path = "rust/param_passing_dep", version = "=1.17.13" }
solana-sbf-rust-realloc = { path = "rust/realloc", version = "=1.17.13", default-features = false }
solana-sbf-rust-realloc-invoke = { path = "rust/realloc_invoke", version = "=1.17.13" }
solana-sdk = { path = "../../sdk", version = "=1.17.13" }
solana-transaction-status = { path = "../../transaction-status", version = "=1.17.13" }
solana-validator = { path = "../../validator", version = "=1.17.13" }
solana-zk-token-sdk = { path = "../../zk-token-sdk", version = "=1.17.13" }
static_assertions = "1.1.0"
thiserror = "1.0"

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

[features]
sbf_c = []
sbf_rust = []
dummy-for-ci-check = [
    "sbf_c",
    "sbf_rust",
]

[build-dependencies]
walkdir = "2"

[dependencies]
bincode = { workspace = true }
byteorder = { workspace = true }
elf = { workspace = true }
itertools = { workspace = true }
log = { workspace = true }
miow = { workspace = true }
net2 = { workspace = true }
solana-account-decoder = { workspace = true }
solana-accounts-db = { workspace = true }
solana-bpf-loader-program = { workspace = true }
solana-cli-output = { workspace = true }
solana-logger = { workspace = true }
solana-measure = { workspace = true }
solana-program-runtime = { workspace = true }
solana-runtime = { workspace = true }
solana-sbf-rust-invoke = { workspace = true }
solana-sbf-rust-realloc = { workspace = true, features = ["default"] }
solana-sbf-rust-realloc-invoke = { workspace = true }
solana-sdk = { workspace = true }
solana-transaction-status = { workspace = true }
solana_rbpf = { workspace = true }

[dev-dependencies]
solana-ledger = { workspace = true }
solana-sdk = { workspace = true, features = ["dev-context-only-utils"] }

[[bench]]
name = "bpf_loader"

[workspace]
members = [
    "rust/128bit",
    "rust/128bit_dep",
    "rust/alloc",
    "rust/alt_bn128",
    "rust/alt_bn128_compression",
    "rust/big_mod_exp",
    "rust/call_depth",
    "rust/caller_access",
    "rust/curve25519",
    "rust/custom_heap",
    "rust/dep_crate",
    "rust/deprecated_loader",
    "rust/dup_accounts",
    "rust/error_handling",
    "rust/external_spend",
    "rust/finalize",
    "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/membuiltins",
    "rust/noop",
    "rust/panic",
    "rust/param_passing",
    "rust/param_passing_dep",
    "rust/poseidon",
    "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_instruction",
    "rust/sibling_instruction",
    "rust/simulation",
    "rust/spoof1",
    "rust/spoof1_system",
    "rust/sysvar",
    "rust/upgradeable",
    "rust/upgraded",
]

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[patch.crates-io]
# We include the following crates as our dependencies from crates.io:
#
#  * spl-associated-token-account
#  * spl-instruction-padding
#  * spl-memo
#  * spl-pod
#  * spl-token
#  * spl-token-2022
#  * 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.
#
# There is a similar override in `../../Cargo.toml`.  Please keep both comments and the
# overrides in sync.
solana-program = { path = "../../sdk/program" }
solana-zk-token-sdk = { path = "../../zk-token-sdk" }
