cairo-native 0.2.6

A compiler to convert Cairo's intermediate representation Sierra code to MLIR.
[package]
name = "cairo-native"
version = "0.2.6"
edition = "2021"
license = "Apache-2.0"
description = "A compiler to convert Cairo's intermediate representation Sierra code to MLIR."
repository = "https://github.com/lambdaclass/cairo_native"
readme = "README.md"
keywords = ["starknet", "cairo", "compiler", "mlir"]

# Explicitly set the resolver to the default for edition >= 2021
# https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html
resolver = "2"

[[bin]]
name = "cairo-native-dump"
required-features = ["build-cli"]

[[bin]]
name = "cairo-native-run"
required-features = ["build-cli"]

[[bin]]
name = "cairo-native-test"
required-features = ["build-cli"]

[[bin]]
name = "cairo-native-stress"
required-features = ["build-cli"]

[[bin]]
name = "scarb-native-test"
required-features = ["scarb"]

[[bin]]
name = "scarb-native-dump"
required-features = ["scarb"]

[features]
default = ["build-cli", "with-runtime"]
build-cli = [
    "dep:clap",
    "dep:tracing-subscriber",
    "dep:anyhow",
    "dep:cairo-lang-test-plugin",
    "dep:colored",
]
scarb = ["build-cli", "dep:scarb-ui", "dep:scarb-metadata"]
with-cheatcode = []
with-debug-utils = []
with-mem-tracing = []
with-runtime = ["dep:cairo-native-runtime"]

# the aquamarine dep is only used in docs and cannot be detected as used by cargo udeps
[package.metadata.cargo-udeps.ignore]
normal = ["aquamarine"]

[dependencies]
aquamarine = "0.6.0"
bumpalo = "3.16.0"
cairo-lang-compiler = "2.10.0-rc.0"
cairo-lang-defs = "2.10.0-rc.0"
cairo-lang-filesystem = "2.10.0-rc.0"
cairo-lang-runner = "2.10.0-rc.0"
cairo-lang-semantic = "2.10.0-rc.0"
cairo-lang-sierra = "2.10.0-rc.0"
cairo-lang-sierra-generator = "2.10.0-rc.0"
educe = "0.5.11" # can't update until https://github.com/magiclen/educe/issues/27
itertools = "0.13.0"
lazy_static = "1.5"
libc = "0.2"
llvm-sys = "191.0.0"
melior = { version = "0.20.2", features = ["ods-dialects", "helpers"] }
mlir-sys = { version = "0.4.1" }
num-bigint = "0.4.6"
num-traits = "0.2"
starknet-types-core = { version = "0.1.7", default-features = false, features = [
    "std",
    "serde",
    "num-traits",
] }
tempfile = "3.15.0"
thiserror = "2.0.9"
tracing = "0.1"
utf8_iter = "1.0.4"


# CLI dependencies
cairo-lang-sierra-ap-change = "2.10.0-rc.0"
cairo-lang-sierra-gas = "2.10.0-rc.0"
cairo-lang-starknet = "2.10.0-rc.0"
cairo-lang-utils = "2.10.0-rc.0"
cairo-lang-starknet-classes = "2.10.0-rc.0"
cairo-native-runtime = { version = "0.2.6", path = "runtime", optional = true }
clap = { version = "4.5.23", features = ["derive"], optional = true }
libloading = "0.8.6"
tracing-subscriber = { version = "0.3.19", features = [
    "env-filter",
    "json",
    "registry",
], optional = true }
serde = { version = "1.0", features = ["derive"] }
anyhow = { version = "1.0", optional = true }
cairo-lang-test-plugin = { version = "2.10.0-rc.0", optional = true }
colored = { version = "2.1.0", optional = true }
# needed to interface with cairo-lang-*
keccak = "0.1.5"
sha2 = "0.10.8"                                          # needed for the syscall handler stub
scarb-metadata = { version = "1.12.0", optional = true }
scarb-ui = { version = "0.1.5", optional = true }
serde_json = { version = "1.0.128" }
stats_alloc = "0.1.10"

# for the syscallhandler stub to match blockifier
ark-secp256k1 = "0.5.0"
ark-secp256r1 = "0.5.0"
ark-ec = "0.5.0"
ark-ff = "0.5.0"
num-integer = "0.1.46"

[dev-dependencies]
cairo-vm = { version = "2.0.0-rc3", features = ["cairo-1-hints"] }
cairo-lang-semantic = { version = "2.10.0-rc.0", features = ["testing"] }
criterion = { version = "0.5.1", features = ["html_reports"] }
lambdaworks-math = "0.11.0"
pretty_assertions_sorted = "1.2.3"
proptest = "1.5.0"
rstest = "0.24.0"
test-case = "3.3"
walkdir = "2.5.0"
serde_json = { version = "1.0.128" }
rayon = "1.10.0"

[build-dependencies]
cc = "1.2.7"

[profile.optimized-dev]
inherits = "dev"
opt-level = 3

[profile.ci]
inherits = "dev"
opt-level = 3
debug = "line-tables-only"

[profile.release]
lto = true
codegen-units = 1

# Set the settings for build scripts and proc-macros.
[profile.dev.build-override]
opt-level = 3

# On dev optimize dependencies a bit so it's not as slow.
[profile.dev.package."*"]
opt-level = 1

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

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

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

[workspace]
members = ["runtime"]