[workspace]
members = [
    "crates/cli",
    "crates/evm2",
    "crates/macros",
    "crates/eest",
    "crates/inspectors",
    "crates/jit",
    "crates/jit/backend",
    "crates/jit/build",
    "crates/jit/builtins",
    "crates/jit/codegen",
    "crates/jit/context",
    "crates/jit/llvm",
    "crates/jit/runtime",
]
resolver = "3"

[workspace.package]
version = "0.1.0"
edition = "2024"
rust-version = "1.96"
authors = ["DaniPopes <57450786+DaniPopes@users.noreply.github.com>"]
license = "MIT OR Apache-2.0"
homepage = "https://github.com/danipopes/evm2"
repository = "https://github.com/danipopes/evm2"
categories = ["cryptography::cryptocurrencies", "development-tools", "no-std"]
keywords = ["bytecode", "ethereum", "evm", "execution", "interpreter"]
exclude = [".github/", "benches/", "fuzz/", "tests/"]

[workspace.lints.clippy]
dbg-macro = "warn"
manual-string-new = "warn"
uninlined-format-args = "warn"
use-self = "warn"
redundant-clone = "warn"
missing-const-for-fn = "warn"

[workspace.lints.rust]
missing-copy-implementations = "warn"
missing-debug-implementations = "warn"
missing-docs = "warn"
rust-2018-idioms = "warn"
unreachable-pub = "warn"
unused-must-use = "warn"
redundant-lifetimes = "warn"
unnameable-types = "warn"

[workspace.lints.rustdoc]
all = "warn"

[workspace.dependencies]
evm2 = { path = "crates/evm2", version = "0.1.0", default-features = false }
evm2-macros = { path = "crates/macros", version = "0.1.0" }
evm2-inspectors = { path = "crates/inspectors", version = "0.1.0" }
evm2-jit = { path = "crates/jit", version = "0.1.0", default-features = false }
evm2-jit-backend = { path = "crates/jit/backend", version = "0.1.0", default-features = false }
evm2-jit-build = { path = "crates/jit/build", version = "0.1.0", default-features = false }
evm2-jit-builtins = { path = "crates/jit/builtins", version = "0.1.0", default-features = false }
evm2-jit-codegen = { path = "crates/jit/codegen", version = "0.1.0", default-features = false }
evm2-jit-context = { path = "crates/jit/context", version = "0.1.0", default-features = false }
evm2-jit-llvm = { path = "crates/jit/llvm", version = "0.1.0", default-features = false }
evm2-jit-runtime = { path = "crates/jit/runtime", version = "0.1.0", default-features = false }

alloy-consensus = { version = "2.0.4", default-features = false }
alloy-chains = { version = "0.2.34", default-features = false }
alloy-eip7928 = { version = "0.4.0", default-features = false }
alloy-eips = { version = "2.0.4", default-features = false }
alloy-hardforks = { version = "0.4", default-features = false }
alloy-primitives = { version = "1.5.7", default-features = false }
alloy-provider = { version = "2.0.4", default-features = false }
alloy-rlp = { version = "0.3", default-features = false }
alloy-rpc-client = { version = "2.0.4", default-features = false }
alloy-rpc-types-eth = { version = "2.0.4", default-features = false }
alloy-rpc-types-trace = { version = "2.0.4", default-features = false }
alloy-sol-types = { version = "1.5.7", default-features = false }
alloy-trie = { version = "0.9", default-features = false }

anstyle = { version = "1.0", default-features = false }
auto_impl = "1.3"
bitvec = { version = "1", default-features = false }
boa_engine = { version = "0.21", default-features = false }
boa_gc = { version = "0.21", default-features = false }
cfg-if = { version = "1.0", default-features = false }
derive-where = { version = "1.6", default-features = false }
colorchoice = { version = "1.0", default-features = false }
clap = { version = "4.5", default-features = false, features = [
    "derive",
    "error-context",
    "help",
    "std",
    "suggestions",
    "usage",
] }
corosensei = { version = "0.3.4", default-features = false, features = [
    "default-stack",
    "unwind",
] }
crossbeam-channel = "0.5"
crossbeam-queue = "0.3"
futures-util = { version = "0.3", default-features = false, features = ["std"] }
color-eyre = "0.6"
eyre = "0.6"
libc = "0.2"
libtest-mimic = "0.8"
once_cell = { version = "1.21", default-features = false }
paste = { version = "1.0", default-features = false }
phf = { version = "0.14", default-features = false }
quanta = "0.12"
postcard = { version = "1.1.3", default-features = false }
rand = "0.10"
rayon = "1.10"
revm = { version = "42", default-features = true, features = ["asm-keccak"] }
rstest = "0.26.0"
ruint = { version = "1.18", default-features = false }
serde = { version = "1.0", default-features = false }
serde_json = { version = "1.0", default-features = false }
snapbox = "1.2"
thiserror = { version = "2.0", default-features = false }
typeid = { version = "1.0.3", default-features = false }
tokio = { version = "1", default-features = false }
tracing = "0.1"
tracing-subscriber = "0.3"
tracing-tracy = "0.11"
walkdir = { version = "2.5", default-features = false }
wait-timeout = "0.2"
wincode = { version = "0.6.0", features = ["derive"] }
zstd = "0.13"

# Precompiles
ark-bls12-381 = { version = "0.6.0", default-features = false }
ark-bn254 = { version = "0.6.0", default-features = false }
ark-ec = { version = "0.6.0", default-features = false }
ark-ff = { version = "0.6.0", default-features = false }
ark-serialize = { version = "0.6.0", default-features = false }
ark-std = { version = "0.6.0", default-features = false }
aurora-engine-modexp = { version = "1.2", default-features = false }
aws-lc-rs = { version = "1.16.2", default-features = false, features = ["aws-lc-sys"] }
blst = "0.3.15"
bn = { package = "substrate-bn", version = "0.6", default-features = false }
c-kzg = { version = "2.1.7", default-features = false }
gmp-mpfr-sys = { version = "1.6", default-features = false }
k256 = { version = "0.14", default-features = false }
mcl_rust = { version = "1", default-features = false }
p256 = { version = "0.14.0", default-features = false }
ripemd = { version = "0.2.0", default-features = false }
secp256k1 = { version = "0.31.1", default-features = false }
sha2 = { version = "0.11.0", default-features = false }

proc-macro2 = "1.0"
quote = "1.0"
syn = "3.0"

# testing
criterion = { package = "codspeed-criterion-compat", version = "4", default-features = false, features = [
    "cargo_bench_support",
] }

[profile.dev]
opt-level = 3

[profile.release]
opt-level = 3
panic = "abort"

# Use the `--profile profiling` flag to show symbols in release mode.
# e.g. `cargo build --profile profiling`
[profile.profiling]
inherits = "release"
debug = "full"
strip = "none"

[profile.bench]
inherits = "release"
lto = "thin"
codegen-units = 1

[patch.crates-io]
# faster compile times: https://github.com/arkworks-rs/algebra/issues/1104
ark-ec = { git = "https://github.com/DaniPopes/algebra", rev = "a71d9795e2e527cd0c80e6831bd957134de30d22" }
ark-bls12-381 = { git = "https://github.com/DaniPopes/algebra", rev = "a71d9795e2e527cd0c80e6831bd957134de30d22" }
ark-bn254 = { git = "https://github.com/DaniPopes/algebra", rev = "a71d9795e2e527cd0c80e6831bd957134de30d22" }
ark-ff = { git = "https://github.com/DaniPopes/algebra", rev = "a71d9795e2e527cd0c80e6831bd957134de30d22" }
ark-ff-asm = { git = "https://github.com/DaniPopes/algebra", rev = "a71d9795e2e527cd0c80e6831bd957134de30d22" }
ark-ff-macros = { git = "https://github.com/DaniPopes/algebra", rev = "a71d9795e2e527cd0c80e6831bd957134de30d22" }
ark-poly = { git = "https://github.com/DaniPopes/algebra", rev = "a71d9795e2e527cd0c80e6831bd957134de30d22" }
ark-serialize = { git = "https://github.com/DaniPopes/algebra", rev = "a71d9795e2e527cd0c80e6831bd957134de30d22" }
ark-serialize-derive = { git = "https://github.com/DaniPopes/algebra", rev = "a71d9795e2e527cd0c80e6831bd957134de30d22" }
