[package]
name = "revive-solidity"
version.workspace = true
license.workspace = true
edition.workspace = true
repository.workspace = true
authors = [
    "Oleksandr Zarudnyi <a.zarudnyy@matterlabs.dev>",
    "Cyrill Leutwiler <cyrill@parity.io>",
]
description = "Solidity frontend for the revive compiler"

[[bin]]
name = "resolc"
path = "src/resolc/main.rs"

[lib]
doctest = false

[dependencies]
clap = { workspace = true }
colored = { workspace = true }
thiserror = { workspace = true }
anyhow = { workspace = true }
which = { workspace = true }
path-slash = { workspace = true }
rayon = { workspace = true, optional = true }

serde = { workspace = true }
serde_json = { workspace = true }
semver = { workspace = true }
once_cell = { workspace = true }
rand = { workspace = true }
regex = { workspace = true }
hex = { workspace = true }
num = { workspace = true }
sha3 = { workspace = true }
md5 = { workspace = true }
inkwell = { workspace = true }

revive-common = { workspace = true }
revive-llvm-context = { workspace = true }

[target.'cfg(target_env = "musl")'.dependencies]
mimalloc = { version = "*", default-features = false }

[target.'cfg(target_os = "emscripten")'.dependencies]
libc = { workspace = true }
inkwell = { workspace = true, features = ["target-riscv", "llvm18-0-no-llvm-linking"]}

[features]
default = ["parallel"]
parallel = ["rayon"]

#TODO: Use pthreads -C target-feature=+atomics,+bulk-memory -Clink-arg=-pthread in compilation and enable `parallel` feature
[target.'cfg(target_os = "emscripten")'.features]
default = []
