[package] name = "soroban-env-host-zephyr" description = "Soroban contract host environment." homepage = "https://github.com/stellar/rs-soroban-env" repository = "https://github.com/stellar/rs-soroban-env" authors = ["Stellar Development Foundation "] license = "Apache-2.0" version.workspace = true readme = "../README.md" edition = "2021" rust-version = "1.74" build = "build.rs" exclude = ["observations/"] [dependencies] soroban-builtin-sdk-macros = { workspace = true } soroban-env-common = { workspace = true, features = ["std", "wasmi", "shallow-val-hash", "serde"] } wasmi = { workspace = true } wasmparser = { workspace = true } stellar-strkey = "=0.0.8" static_assertions = "=1.1.0" sha2 = "=0.10.8" hex-literal = "=0.4.1" hmac = "=0.12.1" # NB: We'll need to pin this again after switching the Core to the new env version. ed25519-dalek = {version = ">=2.0.0", features = ["rand_core"] } # NB: this must match the same rand version used by ed25519-dalek above rand = "=0.8.5" # NB: this must match the same rand_chacha version used by ed25519-dalek above rand_chacha = "=0.3.1" num-traits = "=0.2.17" num-integer = "=0.1.45" num-derive = "=0.4.1" backtrace = { version = "=0.3.71", optional = true } k256 = {version = "=0.13.1", default-features = false, features = ["ecdsa", "arithmetic"]} p256 = {version = "=0.13.2", default-features = false, features = ["ecdsa", "arithmetic"]} ecdsa = {version = "=0.16.7", default-features = false} sec1 = {version = "=0.7.2"} elliptic-curve ={ version = "0.13.5", default-features = false} generic-array ={ version = "0.14.7"} # NB: getrandom is a transitive dependency of k256 which we're not using directly # but we have to specify it here in order to enable its 'js' feature which # is needed to build the host for wasm (a rare but supported config). getrandom = { version = "=0.2.11", features=["js"] } sha3 = "=0.10.8" # NB: this must match the same curve25519-dalek version used by ed25519-dalek # above used only for calibration # # NB temporary: curve25519-dalek _should_ be pinned to =4.1.1, and it _is_ # pinned to that version in stellar-core (which embeds soroban-env-host), but # there is code in curve25519-dalek version 4.1.1 that does not compile on rust # nightly 2024-02-05, because of a small change to the way SIMD code is # feature-gated in the rust stdlib, and for inexplicable reasons docs.rs builds # its documentation using a nightly compiler. As a result, docs for # soroban-env-host can't build if we pin this to 4.1.1 here. So we give it a # _slightly_ wider version range _locally_, just to help the docs.rs build when # it is building docs for this crate alone. When stellar-core builds # soroban-env-host, it will still resolve curve25519-dalek to 4.1.1, since that # version satisfies both stellar-core's strict 4.1.1 requirement as well as our # range-requirement here. IOW nothing about this range-requirement changes what # stellar-core ultimately ships. This is a temporary workaround until the next # protocol release when we can safely bump the minimum curve25519-dalek version # in stellar-core as well. # # NB: we relaxed this further in order to comply with the security advisory # which requires "4.1.3". We will need to pin to this version once Core is # updated to the new env version. curve25519-dalek = { version = ">=4.1.1", default-features = false, features = ["digest"]} serde = "1.0.152" [target.'cfg(not(target_family = "wasm"))'.dependencies] tracy-client = { version = "=0.16.4", features = ["enable", "timer-fallback"], default-features = false, optional = true } [dev-dependencies] hex = "=0.4.3" itertools = "=0.11.0" tabwriter = "=1.3.0" thousands = "=0.2.0" soroban-env-macros = { workspace = true } soroban-test-wasms = { package = "soroban-test-wasms", path = "../soroban-test-wasms" } soroban-synth-wasm = { package = "soroban-synth-wasm", path = "../soroban-synth-wasm", features = ["adversarial"]} soroban-bench-utils = { package = "soroban-bench-utils", path = "../soroban-bench-utils" } bytes-lit = "=0.0.5" textplots = "=0.8.4" wasmprinter = "=0.2.72" expect-test = "=1.4.1" more-asserts = "=0.3.1" pretty_assertions = "=1.4.0" backtrace = "=0.3.71" serde_json = "=1.0.108" arbitrary = "=1.3.2" lstsq = "=0.5.0" nalgebra = { version = "=0.32.3", default-features = false, features = ["std"]} wasm-encoder = "=0.36.2" rustversion = "1.0" wycheproof = "=0.5.1" k256 = {version = "=0.13.1", default-features = false, features = ["alloc"]} p256 = {version = "=0.13.2", default-features = false, features = ["alloc"]} [dev-dependencies.stellar-xdr] version = "=21.2.0" # git = "https://github.com/stellar/rs-stellar-xdr" # rev = "d0138770652a615e3cd99447f2f2727658c17450" default-features = false features = ["arbitrary"] [features] default = ["testutils"] testutils = ["soroban-env-common/testutils", "recording_mode", "dep:backtrace"] next = ["soroban-env-common/next"] tracy = ["dep:tracy-client", "soroban-env-common/tracy"] recording_mode = [] bench = [] # This feature guards the work-in-progress changes in soroban-env-host # API. Its main purpose is to be able to make API changes without bumping # the crate version. # These changes should only be used by importers who depend on # an exact patch version of the crates in this repo, because breaking # changes may be introduced into any version in any code gated by # this feature. # When bumping the major version of any crates in this repo all the code # guarded by this feature should be enabled unconditionally. unstable-next-api = [] [[bench]] required-features = ["bench"] harness = false bench = true name = "worst_case_linear_models" path = "benches/worst_case_linear_models.rs" [[bench]] required-features = ["bench"] harness = false bench = true name = "variation_histograms" path = "benches/variation_histograms.rs" [[test]] name = "secp256r1_sig_ver" path = "tests/secp256r1_sig_ver.rs" required-features = ["testutils"] [package.metadata.docs.rs] features = ["recording_mode", "tracy", "testutils"]