diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81a1a0c68..3e05f11d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,11 +22,11 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest", "macos-latest", "windows-latest"] - rust: ["stable", "1.83"] + rust: ["stable", "1.87"] flags: ["", "--all-features"] exclude: # Skip because some features have higher MSRV. - - rust: "1.83" # MSRV + - rust: "1.87" # MSRV flags: "--all-features" steps: - uses: actions/checkout@v4 diff --git a/Cargo.lock b/Cargo.lock index 9e34f8cbc..d0ed833a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -177,6 +177,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "anyhow" +version = "1.0.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" + [[package]] name = "arbitrary" version = "1.4.1" @@ -1141,6 +1147,7 @@ dependencies = [ "rand 0.8.5", "rayon", "reqwest", + "revive-solc-json-interface", "rstest", "rvm-rs", "semver 1.0.26", @@ -2353,6 +2360,15 @@ dependencies = [ "unarray", ] +[[package]] +name = "psm" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e944464ec8536cd1beb0bbfd96987eb5e3b72f2ecdafdc5c769a37f1fa2ae1f" +dependencies = [ + "cc", +] + [[package]] name = "quick-error" version = "1.2.3" @@ -2645,6 +2661,31 @@ dependencies = [ "windows-registry", ] +[[package]] +name = "revive-common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d2840de13ec1e2d541d1041009f755c4aaf3c9d1500a1378016d7f7b4d0bb3c" +dependencies = [ + "anyhow", + "serde", + "serde_json", + "serde_stacker", +] + +[[package]] +name = "revive-solc-json-interface" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f145f4208ac7729ffc1dda7ffced056ac0d772ba9b40d9be3fa8abb350d82ef3" +dependencies = [ + "anyhow", + "revive-common", + "semver 1.0.26", + "serde", + "serde_json", +] + [[package]] name = "rfc6979" version = "0.4.0" @@ -3066,6 +3107,16 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "serde_stacker" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69c8defe6c780725cce4ec6ad3bd91e321baf6fa4e255df1f31e345d507ef01a" +dependencies = [ + "serde", + "stacker", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -3377,6 +3428,19 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "stacker" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cddb07e32ddb770749da91081d8d0ac3a16f1a569a18b20348cd371f5dead06b" +dependencies = [ + "cc", + "cfg-if", + "libc", + "psm", + "windows-sys 0.59.0", +] + [[package]] name = "static_assertions" version = "1.1.0" diff --git a/Cargo.toml b/Cargo.toml index 31a66a6db..5f826cb90 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,6 +43,7 @@ foundry-compilers-artifacts-vyper = { path = "crates/artifacts/vyper", version = foundry-compilers-artifacts-resolc = { path = "crates/artifacts/resolc", version = "0.14.0" } foundry-compilers-core = { path = "crates/core", version = "0.14.0" } rvm = { package = "rvm-rs", version = "0.0.2", default-features = false } +revive-solc-json-interface = { version = "0.1", default-features = false } alloy-json-abi = { version = "0.8", features = ["serde_json"] } alloy-primitives = { version = "0.8", features = ["serde", "rand"] } diff --git a/crates/compilers/Cargo.toml b/crates/compilers/Cargo.toml index 87fd25d56..fc951f688 100644 --- a/crates/compilers/Cargo.toml +++ b/crates/compilers/Cargo.toml @@ -58,7 +58,7 @@ sha2 = { version = "0.10", default-features = false, optional = true } # rvm rvm = { workspace = true, default-features = false } - +revive-solc-json-interface = { workspace = true, default-features = false } [dev-dependencies] tracing-subscriber = { version = "0.3", default-features = false, features = [ diff --git a/crates/compilers/src/compilers/resolc/input.rs b/crates/compilers/src/compilers/resolc/input.rs index d868cafd3..e5906df91 100644 --- a/crates/compilers/src/compilers/resolc/input.rs +++ b/crates/compilers/src/compilers/resolc/input.rs @@ -4,6 +4,7 @@ use foundry_compilers_artifacts::{ SolcLanguage, Source, Sources, }; use foundry_compilers_core::utils::strip_prefix_owned; +use revive_solc_json_interface::SolcStandardJsonInputSettingsPolkaVMMemory; use semver::Version; use serde::{Deserialize, Serialize}; use std::{collections::HashSet, path::Path}; @@ -36,7 +37,8 @@ pub struct MemoryConfig { impl Default for MemoryConfig { fn default() -> Self { - Self { heap_size: 64 * 1024, stack_size: 32 * 1024 } + let mem = SolcStandardJsonInputSettingsPolkaVMMemory::default(); + Self { heap_size: mem.heap_size, stack_size: mem.stack_size } } }