From bddb264ab307e92522b8308af8e86636c3b59b85 Mon Sep 17 00:00:00 2001 From: Han Date: Tue, 5 Aug 2025 14:17:11 +0800 Subject: [PATCH] Refactor `ere-dockerized` (#77) --- Cargo.lock | 311 +++++-------------- Cargo.toml | 51 ++- README.md | 110 +++++-- crates/build-utils/Cargo.toml | 4 +- crates/build-utils/src/lib.rs | 10 +- crates/ere-cli/Cargo.toml | 5 +- crates/ere-dockerized/Cargo.toml | 19 +- crates/ere-dockerized/build.rs | 2 +- crates/ere-dockerized/src/input.rs | 1 + crates/ere-dockerized/src/lib.rs | 10 + crates/ere-jolt/Cargo.toml | 24 +- crates/ere-jolt/src/lib.rs | 2 + crates/ere-nexus/Cargo.toml | 16 +- crates/ere-nexus/src/lib.rs | 2 + crates/ere-openvm/Cargo.toml | 22 +- crates/ere-openvm/src/lib.rs | 2 + crates/ere-pico/Cargo.toml | 14 +- crates/ere-pico/src/lib.rs | 2 + crates/ere-risc0/Cargo.toml | 29 +- crates/ere-risc0/src/compile.rs | 2 + crates/ere-risc0/src/lib.rs | 2 + crates/ere-sp1/Cargo.toml | 16 +- crates/ere-zisk/Cargo.toml | 24 +- crates/ere-zisk/src/lib.rs | 2 + crates/zkvm-interface/Cargo.toml | 20 +- crates/zkvm-interface/src/lib.rs | 2 + docker/nexus/Dockerfile | 5 +- docker/zisk/Dockerfile | 2 +- scripts/sdk_installers/install_jolt_sdk.sh | 4 +- scripts/sdk_installers/install_nexus_sdk.sh | 36 ++- scripts/sdk_installers/install_openvm_sdk.sh | 0 scripts/sdk_installers/install_pico_sdk.sh | 3 +- tests/jolt/compile/basic/Cargo.toml | 2 +- tests/nexus/guest/Cargo.toml | 2 +- tests/risc0/compile/basic/Cargo.toml | 2 +- tests/sp1/compile/basic/Cargo.toml | 2 +- tests/sp1/execute/basic/Cargo.toml | 2 +- tests/sp1/prove/basic/Cargo.toml | 2 +- 38 files changed, 386 insertions(+), 380 deletions(-) mode change 100644 => 100755 scripts/sdk_installers/install_jolt_sdk.sh mode change 100644 => 100755 scripts/sdk_installers/install_openvm_sdk.sh diff --git a/Cargo.lock b/Cargo.lock index 54229a4..37bde52 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -103,7 +103,7 @@ dependencies = [ "const-hex", "derive_more 2.0.1", "hashbrown 0.15.3", - "indexmap 2.9.0", + "indexmap 2.10.0", "itoa", "k256", "paste", @@ -160,7 +160,7 @@ dependencies = [ "alloy-sol-macro-input 0.7.7", "const-hex", "heck 0.5.0", - "indexmap 2.9.0", + "indexmap 2.10.0", "proc-macro-error", "proc-macro2", "quote", @@ -178,7 +178,7 @@ dependencies = [ "alloy-sol-macro-input 1.3.0", "const-hex", "heck 0.5.0", - "indexmap 2.9.0", + "indexmap 2.10.0", "proc-macro-error2", "proc-macro2", "quote", @@ -1123,9 +1123,9 @@ dependencies = [ [[package]] name = "build-utils" -version = "0.1.0" +version = "0.0.11" dependencies = [ - "cargo_metadata 0.20.0", + "cargo_metadata 0.19.2", "thiserror 2.0.12", "tracing", ] @@ -1144,9 +1144,9 @@ checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" [[package]] name = "bytemuck" -version = "1.23.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9134a6ef01ce4b366b50689c94f82c14bc72bc5d0386829828a2e2752ef7958c" +checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" dependencies = [ "bytemuck_derive", ] @@ -1195,31 +1195,6 @@ dependencies = [ "serde", ] -[[package]] -name = "cargo-platform" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84982c6c0ae343635a3a4ee6dedef965513735c8b183caa7289fa6e27399ebd4" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-util-schemas" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e63d2780ac94487eb9f1fea7b0d56300abc9eb488800854ca217f102f5caccca" -dependencies = [ - "semver 1.0.26", - "serde", - "serde-untagged", - "serde-value", - "thiserror 1.0.69", - "toml 0.8.22", - "unicode-xid", - "url", -] - [[package]] name = "cargo_metadata" version = "0.18.1" @@ -1227,7 +1202,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ "camino", - "cargo-platform 0.1.9", + "cargo-platform", "semver 1.0.26", "serde", "serde_json", @@ -1241,22 +1216,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" dependencies = [ "camino", - "cargo-platform 0.1.9", - "semver 1.0.26", - "serde", - "serde_json", - "thiserror 2.0.12", -] - -[[package]] -name = "cargo_metadata" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f7835cfc6135093070e95eb2b53e5d9b5c403dc3a6be6040ee026270aa82502" -dependencies = [ - "camino", - "cargo-platform 0.2.0", - "cargo-util-schemas", + "cargo-platform", "semver 1.0.26", "serde", "serde_json", @@ -1271,7 +1231,7 @@ checksum = "3fce8dd7fcfcbf3a0a87d8f515194b49d6135acab73e18bd380d1d93bb1a15eb" dependencies = [ "clap", "heck 0.4.1", - "indexmap 2.9.0", + "indexmap 2.10.0", "log", "proc-macro2", "quote", @@ -1279,7 +1239,7 @@ dependencies = [ "serde_json", "syn 2.0.101", "tempfile", - "toml 0.8.22", + "toml", ] [[package]] @@ -1340,9 +1300,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.41" +version = "4.5.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be92d32e80243a54711e5d7ce823c35c41c9d929dc4ab58e1276f625841aadf9" +checksum = "ed87a9d530bb41a67537289bafcac159cb3ee28460e0a4571123d2a778a6a882" dependencies = [ "clap_builder", "clap_derive", @@ -1350,9 +1310,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.41" +version = "4.5.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707eab41e9622f9139419d573eca0900137718000c517d47da73045f54331c3d" +checksum = "64f4f3f3c77c94aff3c7e9aac9a2ca1974a5adf392a8bb751e827d6d127ab966" dependencies = [ "anstream", "anstyle", @@ -1393,7 +1353,7 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "common" version = "0.2.0" -source = "git+https://github.com/a16z/jolt?rev=55b9830#55b9830a3944dde55d33a55c42522b81dd49f87a" +source = "git+https://github.com/a16z/jolt.git?rev=55b9830a3944dde55d33a55c42522b81dd49f87a#55b9830a3944dde55d33a55c42522b81dd49f87a" dependencies = [ "ark-serialize 0.5.0", "serde", @@ -2343,7 +2303,7 @@ dependencies = [ [[package]] name = "ere-cli" -version = "0.1.0" +version = "0.0.11" dependencies = [ "anyhow", "bincode", @@ -2361,7 +2321,7 @@ dependencies = [ [[package]] name = "ere-dockerized" -version = "0.1.0" +version = "0.0.11" dependencies = [ "bincode", "build-utils", @@ -2375,7 +2335,7 @@ dependencies = [ [[package]] name = "ere-jolt" -version = "0.1.0" +version = "0.0.11" dependencies = [ "ark-serialize 0.5.0", "build-utils", @@ -2385,27 +2345,27 @@ dependencies = [ "jolt-sdk", "tempfile", "thiserror 2.0.12", - "toml 0.8.22", + "toml", "zkvm-interface", ] [[package]] name = "ere-nexus" -version = "0.1.0" +version = "0.0.11" dependencies = [ "anyhow", "bincode", "build-utils", "nexus-sdk", "thiserror 2.0.12", - "toml 0.9.2", + "toml", "tracing", "zkvm-interface", ] [[package]] name = "ere-openvm" -version = "0.1.0" +version = "0.0.11" dependencies = [ "build-utils", "openvm-build", @@ -2415,13 +2375,13 @@ dependencies = [ "openvm-transpiler", "serde", "thiserror 2.0.12", - "toml 0.8.22", + "toml", "zkvm-interface", ] [[package]] name = "ere-pico" -version = "0.1.0" +version = "0.0.11" dependencies = [ "bincode", "build-utils", @@ -2432,20 +2392,15 @@ dependencies = [ [[package]] name = "ere-risc0" -version = "0.1.0" +version = "0.0.11" dependencies = [ "anyhow", - "bincode", "borsh", "build-utils", - "bytemuck", "cargo_metadata 0.19.2", - "hex", "risc0-build", "risc0-zkvm", "serde", - "serde_json", - "tempfile", "thiserror 2.0.12", "tracing", "zkvm-interface", @@ -2453,21 +2408,21 @@ dependencies = [ [[package]] name = "ere-sp1" -version = "0.1.0" +version = "0.0.11" dependencies = [ "bincode", "build-utils", "sp1-sdk", "tempfile", "thiserror 2.0.12", - "toml 0.8.22", + "toml", "tracing", "zkvm-interface", ] [[package]] name = "ere-zisk" -version = "0.1.0" +version = "0.0.11" dependencies = [ "bincode", "blake3", @@ -2475,7 +2430,7 @@ dependencies = [ "serde", "tempfile", "thiserror 2.0.12", - "toml 0.8.22", + "toml", "tracing", "zkvm-interface", ] @@ -2958,7 +2913,7 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap 2.9.0", + "indexmap 2.10.0", "slab", "tokio", "tokio-util", @@ -3310,22 +3265,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "humantime" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f" - -[[package]] -name = "humantime-serde" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a3db5ea5923d99402c94e9feb261dc5ee9b4efa158b0315f788cf549cc200c" -dependencies = [ - "humantime", - "serde", -] - [[package]] name = "hybrid-array" version = "0.2.3" @@ -3605,9 +3544,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", "hashbrown 0.15.3", @@ -3745,7 +3684,7 @@ dependencies = [ [[package]] name = "jolt" version = "0.1.0" -source = "git+https://github.com/a16z/jolt?rev=55b9830#55b9830a3944dde55d33a55c42522b81dd49f87a" +source = "git+https://github.com/a16z/jolt.git?rev=55b9830a3944dde55d33a55c42522b81dd49f87a#55b9830a3944dde55d33a55c42522b81dd49f87a" dependencies = [ "clap", "common", @@ -3757,13 +3696,13 @@ dependencies = [ "serde", "syn 1.0.109", "sysinfo", - "toml_edit 0.22.26", + "toml_edit 0.22.27", ] [[package]] name = "jolt-core" version = "0.1.0" -source = "git+https://github.com/a16z/jolt?rev=55b9830#55b9830a3944dde55d33a55c42522b81dd49f87a" +source = "git+https://github.com/a16z/jolt.git?rev=55b9830a3944dde55d33a55c42522b81dd49f87a#55b9830a3944dde55d33a55c42522b81dd49f87a" dependencies = [ "alloy-primitives 0.7.7", "alloy-sol-types 0.7.7", @@ -3817,7 +3756,7 @@ dependencies = [ [[package]] name = "jolt-sdk" version = "0.1.0" -source = "git+https://github.com/a16z/jolt?rev=55b9830#55b9830a3944dde55d33a55c42522b81dd49f87a" +source = "git+https://github.com/a16z/jolt.git?rev=55b9830a3944dde55d33a55c42522b81dd49f87a#55b9830a3944dde55d33a55c42522b81dd49f87a" dependencies = [ "ark-bn254", "ark-ec", @@ -3831,7 +3770,7 @@ dependencies = [ [[package]] name = "jolt-sdk-macros" version = "0.1.0" -source = "git+https://github.com/a16z/jolt?rev=55b9830#55b9830a3944dde55d33a55c42522b81dd49f87a" +source = "git+https://github.com/a16z/jolt.git?rev=55b9830a3944dde55d33a55c42522b81dd49f87a#55b9830a3944dde55d33a55c42522b81dd49f87a" dependencies = [ "common", "proc-macro2", @@ -4225,7 +4164,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62a6a1f7141f1d9bc7a886b87536bbfc97752e08b369e1e0453a9acfab5f5da4" dependencies = [ - "indexmap 2.9.0", + "indexmap 2.10.0", "itoa", "lockfree-object-pool", "metrics", @@ -4246,10 +4185,10 @@ dependencies = [ "crossbeam-epoch", "crossbeam-utils", "hashbrown 0.14.5", - "indexmap 2.9.0", + "indexmap 2.10.0", "metrics", "num_cpus", - "ordered-float 4.6.0", + "ordered-float", "quanta", "radix_trie", "sketches-ddsketch", @@ -4335,7 +4274,7 @@ dependencies = [ [[package]] name = "nexus-common" version = "0.3.4" -source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" +source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=v0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" dependencies = [ "rrs-lib 0.1.0 (git+https://github.com/GregAC/rrs/)", "serde", @@ -4346,7 +4285,7 @@ dependencies = [ [[package]] name = "nexus-core" version = "0.3.4" -source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" +source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=v0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" dependencies = [ "nexus-vm", "nexus-vm-prover", @@ -4355,7 +4294,7 @@ dependencies = [ [[package]] name = "nexus-precompile-macros" version = "0.1.0" -source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" +source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=v0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" dependencies = [ "nexus-common", "proc-macro-crate 3.3.0", @@ -4369,7 +4308,7 @@ dependencies = [ [[package]] name = "nexus-precompiles" version = "0.3.4" -source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" +source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=v0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" dependencies = [ "nexus-common", "nexus-precompile-macros", @@ -4378,7 +4317,7 @@ dependencies = [ [[package]] name = "nexus-profiler" version = "0.3.4" -source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" +source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=v0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" dependencies = [ "pprof", ] @@ -4386,7 +4325,7 @@ dependencies = [ [[package]] name = "nexus-sdk" version = "0.3.4" -source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" +source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=v0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" dependencies = [ "crypto", "crypto-common", @@ -4402,7 +4341,7 @@ dependencies = [ [[package]] name = "nexus-sdk-macros" version = "0.3.4" -source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" +source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=v0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" dependencies = [ "nexus-profiler", "proc-macro-crate 3.3.0", @@ -4414,7 +4353,7 @@ dependencies = [ [[package]] name = "nexus-vm" version = "0.3.4" -source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" +source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=v0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" dependencies = [ "elf", "itertools 0.14.0", @@ -4440,7 +4379,7 @@ dependencies = [ [[package]] name = "nexus-vm-prover" version = "0.3.4" -source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" +source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=v0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" dependencies = [ "impl-trait-for-tuples", "itertools 0.13.0", @@ -4457,7 +4396,7 @@ dependencies = [ [[package]] name = "nexus-vm-prover-macros" version = "0.3.4" -source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" +source = "git+https://github.com/nexus-xyz/nexus-zkvm.git?tag=v0.3.4#8eb6cb423073ca308d64d9fec21a3bfa59b6e4ea" dependencies = [ "convert_case 0.7.1", "proc-macro2", @@ -4743,7 +4682,7 @@ checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "crc32fast", "hashbrown 0.15.3", - "indexmap 2.9.0", + "indexmap 2.10.0", "memchr", ] @@ -5634,7 +5573,7 @@ dependencies = [ "serde", "serde_json", "static_assertions", - "toml 0.8.22", + "toml", "tracing", "tracing-forest", "tracing-subscriber 0.3.19", @@ -5661,15 +5600,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" -[[package]] -name = "ordered-float" -version = "2.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" -dependencies = [ - "num-traits", -] - [[package]] name = "ordered-float" version = "4.6.0" @@ -6781,13 +6711,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset 0.4.2", - "indexmap 2.9.0", + "indexmap 2.10.0", ] [[package]] name = "pico-derive" version = "0.1.0" -source = "git+https://github.com/brevis-network/pico?tag=v1.1.4#ef8229f8d13a9d7778b8a547d2bb5bf77374347e" +source = "git+https://github.com/brevis-network/pico.git?tag=v1.1.4#ef8229f8d13a9d7778b8a547d2bb5bf77374347e" dependencies = [ "proc-macro2", "quote", @@ -6797,7 +6727,7 @@ dependencies = [ [[package]] name = "pico-patch-libs" version = "1.1.3" -source = "git+https://github.com/brevis-network/pico?tag=v1.1.4#ef8229f8d13a9d7778b8a547d2bb5bf77374347e" +source = "git+https://github.com/brevis-network/pico.git?tag=v1.1.4#ef8229f8d13a9d7778b8a547d2bb5bf77374347e" dependencies = [ "bincode", "serde", @@ -6806,7 +6736,7 @@ dependencies = [ [[package]] name = "pico-sdk" version = "1.1.3" -source = "git+https://github.com/brevis-network/pico?tag=v1.1.4#ef8229f8d13a9d7778b8a547d2bb5bf77374347e" +source = "git+https://github.com/brevis-network/pico.git?tag=v1.1.4#ef8229f8d13a9d7778b8a547d2bb5bf77374347e" dependencies = [ "anyhow", "bincode", @@ -6832,7 +6762,7 @@ dependencies = [ [[package]] name = "pico-vm" version = "1.1.3" -source = "git+https://github.com/brevis-network/pico?tag=v1.1.4#ef8229f8d13a9d7778b8a547d2bb5bf77374347e" +source = "git+https://github.com/brevis-network/pico.git?tag=v1.1.4#ef8229f8d13a9d7778b8a547d2bb5bf77374347e" dependencies = [ "anyhow", "arrayref", @@ -7098,7 +7028,7 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" dependencies = [ - "toml_edit 0.22.26", + "toml_edit 0.22.27", ] [[package]] @@ -8323,7 +8253,7 @@ dependencies = [ "strum", "tempfile", "thiserror 2.0.12", - "toml 0.8.22", + "toml", "yaml-rust2", ] @@ -8477,27 +8407,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde-untagged" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "299d9c19d7d466db4ab10addd5703e4c615dec2a5a16dbbafe191045e87ee66e" -dependencies = [ - "erased-serde", - "serde", - "typeid", -] - -[[package]] -name = "serde-value" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" -dependencies = [ - "ordered-float 2.10.1", - "serde", -] - [[package]] name = "serde_arrays" version = "0.1.0" @@ -8529,9 +8438,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" dependencies = [ "itoa", "memchr", @@ -8551,18 +8460,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_spanned" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" dependencies = [ "serde", ] @@ -8589,7 +8489,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.9.0", + "indexmap 2.10.0", "serde", "serde_derive", "serde_json", @@ -9825,45 +9725,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", - "serde_spanned 0.6.8", - "toml_datetime 0.6.9", - "toml_edit 0.22.26", -] - -[[package]] -name = "toml" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed0aee96c12fa71097902e0bb061a5e1ebd766a6636bb605ba401c45c1650eac" -dependencies = [ - "indexmap 2.9.0", - "serde", - "serde_spanned 1.0.0", - "toml_datetime 0.7.0", - "toml_parser", - "toml_writer", - "winnow 0.7.10", + "serde_spanned", + "toml_datetime", + "toml_edit 0.22.27", ] [[package]] name = "toml_datetime" -version = "0.6.9" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_datetime" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" dependencies = [ "serde", ] @@ -9874,45 +9750,30 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.9.0", - "toml_datetime 0.6.9", + "indexmap 2.10.0", + "toml_datetime", "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.22.26" +version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "indexmap 2.9.0", + "indexmap 2.10.0", "serde", - "serde_spanned 0.6.8", - "toml_datetime 0.6.9", + "serde_spanned", + "toml_datetime", "toml_write", "winnow 0.7.10", ] -[[package]] -name = "toml_parser" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97200572db069e74c512a14117b296ba0a80a30123fbbb5aa1f4a348f639ca30" -dependencies = [ - "winnow 0.7.10", -] - [[package]] name = "toml_write" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb942dfe1d8e29a7ee7fcbde5bd2b9a25fb89aa70caea2eba3bee836ff41076" - -[[package]] -name = "toml_writer" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" [[package]] name = "tonic" @@ -9998,7 +9859,7 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracer" version = "0.2.0" -source = "git+https://github.com/a16z/jolt?rev=55b9830#55b9830a3944dde55d33a55c42522b81dd49f87a" +source = "git+https://github.com/a16z/jolt.git?rev=55b9830a3944dde55d33a55c42522b81dd49f87a#55b9830a3944dde55d33a55c42522b81dd49f87a" dependencies = [ "clap", "common", @@ -11065,7 +10926,7 @@ dependencies = [ "crossbeam-utils", "displaydoc", "flate2", - "indexmap 2.9.0", + "indexmap 2.10.0", "memchr", "thiserror 2.0.12", "zopfli", @@ -11126,15 +10987,13 @@ dependencies = [ [[package]] name = "zkvm-interface" -version = "0.1.0" +version = "0.0.11" dependencies = [ - "anyhow", "auto_impl", "bincode", "clap", "erased-serde", - "humantime-serde", - "indexmap 2.9.0", + "indexmap 2.10.0", "serde", "serde_json", "thiserror 2.0.12", diff --git a/Cargo.toml b/Cargo.toml index e334163..d64c240 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ members = [ resolver = "2" [workspace.package] -version = "0.1.0" +version = "0.0.11" edition = "2024" rust-version = "1.85" license = "MIT OR Apache-2.0" @@ -26,14 +26,51 @@ license = "MIT OR Apache-2.0" [workspace.lints] [workspace.dependencies] +anyhow = "1.0.98" +auto_impl = "1.3.0" +bincode = "1.3.3" +blake3 = "1.8.2" +borsh = "1.5.7" +bytemuck = "1.23.1" +cargo_metadata = "0.19.0" +clap = "4.5.42" +erased-serde = "0.4.6" +indexmap = "2.10.0" +serde = "1.0.219" +serde_json = "1.0.142" +tempfile = "3.20.0" +thiserror = "2.0.12" +toml = "0.8.23" tracing = "0.1.41" -tempfile = "3.3" -toml = "0.8" -clap = { version = "4.5", features = ["derive"] } -anyhow = "1.0" -hex = "0.4.3" -# local dependencies +# Jolt dependencies +ark-serialize = "0.5.0" +common = { git = "https://github.com/a16z/jolt.git", rev = "55b9830a3944dde55d33a55c42522b81dd49f87a" } +jolt = { git = "https://github.com/a16z/jolt.git", rev = "55b9830a3944dde55d33a55c42522b81dd49f87a" } +jolt-core = { git = "https://github.com/a16z/jolt.git", rev = "55b9830a3944dde55d33a55c42522b81dd49f87a" } +jolt-sdk = { git = "https://github.com/a16z/jolt.git", rev = "55b9830a3944dde55d33a55c42522b81dd49f87a" } + +# Nexus dependencies +nexus-sdk = { git = "https://github.com/nexus-xyz/nexus-zkvm.git", tag = "v0.3.4" } + +# OpenVM dependencies +openvm-build = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.0", default-features = false } +openvm-circuit = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.0", default-features = false } +openvm-sdk = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.0", default-features = false } +openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.1.0" } +openvm-transpiler = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.0", default-features = false } + +# Pico dependencies +pico-sdk = { git = "https://github.com/brevis-network/pico.git", tag = "v1.1.4" } + +# Risc0 dependencies +risc0-build = "2.3.1" +risc0-zkvm = { version = "2.3.1", default-features = false } + +# SP1 dependencies +sp1-sdk = "5.1.0" + +# Local dependencies zkvm-interface = { path = "crates/zkvm-interface" } build-utils = { path = "crates/build-utils" } ere-cli = { path = "crates/ere-cli" } diff --git a/README.md b/README.md index 4cae310..5569969 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,8 @@ * [Supported zkVMs](#supported-zkvms) * [Quick Start](#quick-start) - * [1. Install SDKs](#1-install-sdks) - * [2. Add Dependencies](#2-add-dependencies) - * [3. Compile & Prove Example](#3-compile--prove-example) - * [4. Run the Test Suite](#4-run-the-test-suite) + * [Option 1: With SDK Installation](#option-1-with-sdk-installation) + * [Option 2: Docker-Only Setup](#option-2-docker-only-setup) * [Directory Layout](#directory-layout) * [Architecture](#architecture) @@ -51,49 +49,107 @@ ## Quick Start This guide assumes you have Rust and Cargo installed. If not, please refer to the [Rust installation guide](https://www.rust-lang.org/tools/install). -Also, you must have Docker installed since some of the SDKs require it. +Choose your setup approach: -### 1. Install SDKs (if required) +### Option 1: With SDK Installation + +Install the required zkVM SDKs locally for better performance and debugging. + +#### 1. Install SDKs -All zkVMs but SP1 require you to install their SDKs, for example: ```bash -bash scripts/sdk_installers/install_jolt_sdk.sh +bash scripts/sdk_installers/install_sp1_sdk.sh ``` -For SP1, guest program compilation uses Docker. With time more zkVMs will follow this patterns so installing SDKs -in the host machine isn't necessary. - -### 2. Add Dependencies +#### 2. Add Dependencies ```toml # Cargo.toml [dependencies] -zkvm-interface = { path = "crates/zkvm-interface" } -ere-sp1 = { path = "crates/ere-sp1" } +zkvm-interface = { git = "https://github.com/eth-act/ere.git", tag = "v0.0.11" } +ere-sp1 = { git = "https://github.com/eth-act/ere.git", tag = "v0.0.11" } ``` -### 3. Compile & Prove Example +#### 3. Compile & Prove Example ```rust -use zkvm_interface::{Compiler, zkVM, Input, ProverResourceType}; +// main.rs use ere_sp1::{EreSP1, RV32_IM_SUCCINCT_ZKVM_ELF}; +use zkvm_interface::{Compiler, Input, ProverResourceType, zkVM}; -let guest_directory = std::path::Path::new("guest/hello"); -let elf = RV32_IM_SUCCINCT_ZKVM_ELF.compile(guest_directory)?; // compile -let mut io = Input::new(); -io.write(&42u32)?; -let zkvm = EreSP1::new(elf, ProverResourceType::Cpu); // create zkVM instance -let (proof, _report) = zkvm.prove(&io)?; // prove -zkvm.verify(&proof)?; // verify +fn main() -> Result<(), Box> { + let guest_directory = std::path::Path::new("workspace/guest"); + + // Compile guest + let compiler = RV32_IM_SUCCINCT_ZKVM_ELF; + let program = compiler.compile(guest_directory)?; + + // Create zkVM instance + let zkvm = EreSP1::new(program, ProverResourceType::Cpu); + + // Prepare inputs + let mut io = Input::new(); + io.write(42u32); + + // Execute + let _report = zkvm.execute(&io)?; + + // Prove + let (proof, _report) = zkvm.prove(&io)?; + + // Verify + zkvm.verify(&proof)?; + + Ok(()) +} ``` -### 4. Run the Test Suite +### Option 2: Docker-Only Setup -```bash -cargo test --workspace +Use Docker for zkVM operations without installing SDKs locally. Only requires Docker to be installed. + +#### 1. Add Dependencies + +```toml +# Cargo.toml +[dependencies] +zkvm-interface = { git = "https://github.com/eth-act/ere.git", tag = "v0.0.11" } +ere-dockerized = { git = "https://github.com/eth-act/ere.git", tag = "v0.0.11" } ``` -> **Tip** Use the provided Dockerfiles for a ready‑made toolchain. +#### 2. Compile & Prove Example + +```rust +// main.rs +use ere_dockerized::{EreDockerizedCompiler, EreDockerizedzkVM, ErezkVM}; +use zkvm_interface::{Compiler, Input, ProverResourceType, zkVM}; + +fn main() -> Result<(), Box> { + let guest_directory = std::path::Path::new("workspace/guest"); + + // Compile guest + let compiler = EreDockerizedCompiler::new(ErezkVM::SP1, std::path::Path::new("workspace")); + let program = compiler.compile(guest_directory)?; + + // Create zkVM instance + let zkvm = EreDockerizedzkVM::new(ErezkVM::SP1, program, ProverResourceType::Cpu)?; + + // Prepare inputs + let mut io = Input::new(); + io.write(42u32); + + // Execute + let _report = zkvm.execute(&io)?; + + // Prove + let (proof, _report) = zkvm.prove(&io)?; + + // Verify + zkvm.verify(&proof)?; + + Ok(()) +} +``` ## Directory Layout diff --git a/crates/build-utils/Cargo.toml b/crates/build-utils/Cargo.toml index a76b1ad..4c78428 100644 --- a/crates/build-utils/Cargo.toml +++ b/crates/build-utils/Cargo.toml @@ -7,8 +7,8 @@ license.workspace = true [dependencies] tracing.workspace = true -cargo_metadata = "0.20.0" -thiserror = "2.0.12" +cargo_metadata.workspace = true +thiserror.workspace = true [lints] workspace = true diff --git a/crates/build-utils/src/lib.rs b/crates/build-utils/src/lib.rs index 68abfd1..6e5fdc2 100644 --- a/crates/build-utils/src/lib.rs +++ b/crates/build-utils/src/lib.rs @@ -44,5 +44,13 @@ pub fn detect_self_crate_version() -> String { .expect("Failed to get cargo metadata"); // `root_package` returns the crate of the `build.rs` that being ran. - meta.root_package().unwrap().version.to_string() + let version = meta.root_package().unwrap().version.to_string(); + + let output = std::process::Command::new("git") + .args(["rev-parse", "--short=7", "HEAD"]) + .output() + .expect("Failed to get git revision"); + let rev = String::from_utf8_lossy(&output.stdout).trim().to_string(); + + format!("{version}-{rev}") } diff --git a/crates/ere-cli/Cargo.toml b/crates/ere-cli/Cargo.toml index 7f8ae6b..94e1826 100644 --- a/crates/ere-cli/Cargo.toml +++ b/crates/ere-cli/Cargo.toml @@ -7,10 +7,11 @@ license.workspace = true [dependencies] anyhow.workspace = true +bincode.workspace = true clap.workspace = true -bincode = "1.3" -serde = { version = "1.0", features = ["derive"] } +serde = { workspace = true, features = ["derive"] } +# Local dependencies ere-jolt = { workspace = true, optional = true } ere-nexus = { workspace = true, optional = true } ere-openvm = { workspace = true, optional = true } diff --git a/crates/ere-dockerized/Cargo.toml b/crates/ere-dockerized/Cargo.toml index bad6c2a..158b7bd 100644 --- a/crates/ere-dockerized/Cargo.toml +++ b/crates/ere-dockerized/Cargo.toml @@ -6,21 +6,22 @@ rust-version.workspace = true license.workspace = true [dependencies] -bincode = "1.3" -serde = { version = "1.0", features = ["derive"] } -tempfile = "3.3" -thiserror = "2" - -zkvm-interface = { workspace = true, features = ["clap"] } +bincode.workspace = true +serde = { workspace = true, features = ["derive"] } +tempfile.workspace = true +thiserror.workspace = true # Needed for Risc0 and OpenVM input serialization. -bytemuck = "1.13" -risc0-zkvm = { version = "^2.3.0", default-features = false } +bytemuck.workspace = true +risc0-zkvm.workspace = true + +# Local dependencies +zkvm-interface = { workspace = true, features = ["clap"] } [dev-dependencies] [build-dependencies] -build-utils = { workspace = true } +build-utils.workspace = true [lints] workspace = true diff --git a/crates/ere-dockerized/build.rs b/crates/ere-dockerized/build.rs index 48a48b5..f702cc6 100644 --- a/crates/ere-dockerized/build.rs +++ b/crates/ere-dockerized/build.rs @@ -36,7 +36,7 @@ fn generate_zkvm_sdk_version_impl() { ] .map(detect_sdk_version); - // FIXME: ZisK doens't depend on SDK yet, so we hardcode the version here, + // FIXME: ZisK doesn't depend on SDK yet, so we hardcode the version here, // same as the one in `scripts/sdk_installers/install_zisk_sdk.sh`. // Once ZisK's SDK is ready, we should update this to detect the SDK // version. diff --git a/crates/ere-dockerized/src/input.rs b/crates/ere-dockerized/src/input.rs index f4459d8..664836b 100644 --- a/crates/ere-dockerized/src/input.rs +++ b/crates/ere-dockerized/src/input.rs @@ -17,6 +17,7 @@ impl ErezkVM { // duplicated extern symbol they export. // It'd be better to have each zkvm provides their // lightweight serde crate. + // The issue for tracking https://github.com/eth-act/ere/issues/76. Self::OpenVM => risc0_zkvm::serde::to_vec(obj) .map(|words| words.into_iter().flat_map(|w| w.to_le_bytes()).collect()) .map_err(|err| { diff --git a/crates/ere-dockerized/src/lib.rs b/crates/ere-dockerized/src/lib.rs index c2e40b8..5508fec 100644 --- a/crates/ere-dockerized/src/lib.rs +++ b/crates/ere-dockerized/src/lib.rs @@ -6,6 +6,16 @@ //! `zkVM` implementation of other zkVM crates `ere-{zkvm}`, it requires only //! `docker` to be installed, but no zkVM specific SDK. //! +//! ## Docker image building +//! +//! It builds 3 Docker images in sequence if they don't exist: +//! 1. `ere-base:{version}` - Base image with common dependencies +//! 2. `ere-base-{zkvm}:{version}` - zkVM-specific base image with the zkVM SDK +//! 3. `ere-cli-{zkvm}:{version}` - CLI image with the `ere-cli` binary built +//! with the selected zkVM feature +//! +//! To force rebuild all images, set the environment variable `ERE_FORCE_REBUILD_DOCKER_IMAGE=true`. +//! //! ## Example //! //! ```rust,no_run diff --git a/crates/ere-jolt/Cargo.toml b/crates/ere-jolt/Cargo.toml index bb1ce73..f479653 100644 --- a/crates/ere-jolt/Cargo.toml +++ b/crates/ere-jolt/Cargo.toml @@ -6,18 +6,22 @@ rust-version.workspace = true license.workspace = true [dependencies] -zkvm-interface = { workspace = true } -jolt-sdk = { git = "https://github.com/a16z/jolt", rev = "55b9830", features = ["host"] } -jolt-core = { git = "https://github.com/a16z/jolt", rev = "55b9830", features = ["host"] } -jolt = { git = "https://github.com/a16z/jolt", rev = "55b9830", features = ["host"] } -common = { git = "https://github.com/a16z/jolt", rev = "55b9830" } -thiserror = "2" -toml = "0.8" -ark-serialize = { version = "0.5.0", features = ["derive"] } -tempfile = "3.3" +tempfile.workspace = true +thiserror.workspace = true +toml.workspace = true + +# Jolt dependencies +ark-serialize = { workspace = true, features = ["derive"] } +common.workspace = true +jolt = { workspace = true, features = ["host"] } +jolt-core = { workspace = true, features = ["host"] } +jolt-sdk = { workspace = true, features = ["host"] } + +# Local dependencies +zkvm-interface.workspace = true [build-dependencies] -build-utils = { workspace = true } +build-utils.workspace = true [lints] workspace = true diff --git a/crates/ere-jolt/src/lib.rs b/crates/ere-jolt/src/lib.rs index 9986d56..f1166e7 100644 --- a/crates/ere-jolt/src/lib.rs +++ b/crates/ere-jolt/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + use crate::{ error::{CompileError, JoltError, ProveError, VerifyError}, utils::package_name_from_manifest, diff --git a/crates/ere-nexus/Cargo.toml b/crates/ere-nexus/Cargo.toml index 96048c3..bd402ed 100644 --- a/crates/ere-nexus/Cargo.toml +++ b/crates/ere-nexus/Cargo.toml @@ -6,17 +6,19 @@ rust-version.workspace = true license.workspace = true [dependencies] -zkvm-interface = { workspace = true } +bincode.workspace = true +thiserror.workspace = true +toml.workspace = true +tracing.workspace = true -nexus-sdk = { git = "https://github.com/nexus-xyz/nexus-zkvm.git", tag = "0.3.4", version = "0.3.4" } +# Nexus dependencies +nexus-sdk.workspace = true -thiserror = "2" -bincode = "1.3" -tracing = "0.1" -toml = { version = "0.9.2", features = ["parse", "display", "serde"] } +# Local dependencies +zkvm-interface.workspace = true [dev-dependencies] -anyhow = "1.0" +anyhow.workspace = true [build-dependencies] build-utils.workspace = true diff --git a/crates/ere-nexus/src/lib.rs b/crates/ere-nexus/src/lib.rs index bb9ab7d..da42755 100644 --- a/crates/ere-nexus/src/lib.rs +++ b/crates/ere-nexus/src/lib.rs @@ -1,4 +1,6 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![allow(clippy::uninlined_format_args)] + use std::path::{Path, PathBuf}; use std::time::Instant; diff --git a/crates/ere-openvm/Cargo.toml b/crates/ere-openvm/Cargo.toml index 8a4b024..b1355ec 100644 --- a/crates/ere-openvm/Cargo.toml +++ b/crates/ere-openvm/Cargo.toml @@ -6,20 +6,22 @@ rust-version.workspace = true license.workspace = true [dependencies] -zkvm-interface = { workspace = true } +serde = { workspace = true, features = ["derive"] } +thiserror.workspace = true +toml.workspace = true -openvm-sdk = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.0", default-features = false } -openvm-circuit = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.0", default-features = false } -openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.1.0" } -openvm-build = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.0", default-features = false } -openvm-transpiler = { git = "https://github.com/openvm-org/openvm.git", tag = "v1.2.0", default-features = false } +# OpenVM dependencies +openvm-build.workspace = true +openvm-circuit.workspace = true +openvm-sdk.workspace = true +openvm-stark-sdk.workspace = true +openvm-transpiler.workspace = true -toml = "0.8" -thiserror = "2" -serde = { version = "1.0", features = ["derive"] } +# Local dependencies +zkvm-interface.workspace = true [build-dependencies] -build-utils = { workspace = true } +build-utils.workspace = true [lints] workspace = true diff --git a/crates/ere-openvm/src/lib.rs b/crates/ere-openvm/src/lib.rs index 4d46b1f..445f388 100644 --- a/crates/ere-openvm/src/lib.rs +++ b/crates/ere-openvm/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + use crate::error::{CompileError, ExecuteError, OpenVMError, VerifyError}; use openvm_build::GuestOptions; use openvm_circuit::{ diff --git a/crates/ere-pico/Cargo.toml b/crates/ere-pico/Cargo.toml index 619826b..181dd3b 100644 --- a/crates/ere-pico/Cargo.toml +++ b/crates/ere-pico/Cargo.toml @@ -6,13 +6,17 @@ rust-version.workspace = true license.workspace = true [dependencies] -zkvm-interface = { workspace = true } -thiserror = "2" -pico-sdk = { git = "https://github.com/brevis-network/pico", tag = "v1.1.4" } -bincode = "1.3.3" +bincode.workspace = true +thiserror.workspace = true + +# Pico dependencies +pico-sdk.workspace = true + +# Local dependencies +zkvm-interface.workspace = true [build-dependencies] -build-utils = { workspace = true } +build-utils.workspace = true [lints] workspace = true diff --git a/crates/ere-pico/src/lib.rs b/crates/ere-pico/src/lib.rs index c0de2cd..22fabf5 100644 --- a/crates/ere-pico/src/lib.rs +++ b/crates/ere-pico/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + use pico_sdk::client::DefaultProverClient; use std::{path::Path, process::Command, time::Instant}; use zkvm_interface::{ diff --git a/crates/ere-risc0/Cargo.toml b/crates/ere-risc0/Cargo.toml index 8867584..f95836e 100644 --- a/crates/ere-risc0/Cargo.toml +++ b/crates/ere-risc0/Cargo.toml @@ -6,25 +6,22 @@ rust-version.workspace = true license.workspace = true [dependencies] -zkvm-interface = { workspace = true } -anyhow = "1.0" -# Use `risc0-build` to build package instead of `cargo-risczero` for `unstable` features -risc0-build = { version = "^2.3.0", features = ["unstable"] } -risc0-zkvm = { version = "^2.3.0", features = ["unstable"] } -borsh = "1.5.7" -hex = "*" +anyhow.workspace = true +borsh.workspace = true +cargo_metadata.workspace = true +serde = { workspace = true, features = ["derive", "rc"] } +thiserror.workspace = true +tracing.workspace = true -tempfile = "3.3" -serde_json = "1.0" -thiserror = "2" -serde = { version = "1.0.219", features = ["derive", "rc"] } -tracing = "0.1" -bytemuck = "1.13" -bincode = "1.3" -cargo_metadata = "0.19" +# Risc0 dependencies +risc0-build = { workspace = true, default-features = true, features = ["unstable"] } +risc0-zkvm = { workspace = true, default-features = true, features = ["unstable"] } + +# Local dependencies +zkvm-interface.workspace = true [build-dependencies] -build-utils = { workspace = true } +build-utils.workspace = true [features] metal = ["risc0-zkvm/metal"] diff --git a/crates/ere-risc0/src/compile.rs b/crates/ere-risc0/src/compile.rs index 5b1e92b..296fdfa 100644 --- a/crates/ere-risc0/src/compile.rs +++ b/crates/ere-risc0/src/compile.rs @@ -22,6 +22,8 @@ pub fn compile_risc0_program(guest_directory: &Path) -> Result&2 - echo "Install the RISC-V target:" - rustup target add riscv32i-unknown-none-elf + echo "Error: 'cargo-nexus --version' failed. Nexus CLI might not have installed correctly." >&2 + echo " Ensure ${HOME}/.cargo/bin is in your PATH for new shells." >&2 + exit 1 fi -echo "Checking for cargo-nexus..." -if cargo --list | grep "nexus"; then - echo "cargo-nexus found." +echo "Verifying Nexus's target installation..." +if rustup target list --installed | grep -q "riscv32i-unknown-none-elf"; then + echo "Target 'riscv32i-unknown-none-elf' installation verified successfully." else - echo "cargo-nexus not found after installation!" >&2 - echo "Install the cargo-nexus:" - cargo install --git https://github.com/nexus-xyz/nexus-zkvm cargo-nexus --tag 'v0.3.4' + echo "Target 'riscv32i-unknown-none-elf' not installed correctly." >&2 + echo " Ensure ${HOME}/.cargo/bin is in your PATH for new shells." >&2 + exit 1 fi diff --git a/scripts/sdk_installers/install_openvm_sdk.sh b/scripts/sdk_installers/install_openvm_sdk.sh old mode 100644 new mode 100755 diff --git a/scripts/sdk_installers/install_pico_sdk.sh b/scripts/sdk_installers/install_pico_sdk.sh index c15acbd..8a5c3f9 100755 --- a/scripts/sdk_installers/install_pico_sdk.sh +++ b/scripts/sdk_installers/install_pico_sdk.sh @@ -29,6 +29,7 @@ ensure_tool_installed "git" "to install pico-cli from a git repository" ensure_tool_installed "cargo" "to build and install Rust packages" PICO_TOOLCHAIN_VERSION="nightly-2024-11-27" +PICO_CLI_VERSION_TAG="v1.1.4" # Install the specific nightly toolchain for Pico echo "Installing Pico-specific Rust toolchain: ${PICO_TOOLCHAIN_VERSION}..." @@ -38,7 +39,7 @@ rustup component add rust-src --toolchain "${PICO_TOOLCHAIN_VERSION}" # Install pico-cli using the specified toolchain # cargo-pico is a cargo subcommand, typically installed to $HOME/.cargo/bin echo "Installing pico-cli from GitHub repository (brevis-network/pico)..." -cargo "+${PICO_TOOLCHAIN_VERSION}" install --git https://github.com/brevis-network/pico pico-cli +cargo "+${PICO_TOOLCHAIN_VERSION}" install --git https://github.com/brevis-network/pico pico-cli --tag "$PICO_CLI_VERSION_TAG" # Verify pico-cli installation echo "Verifying pico-cli installation..." diff --git a/tests/jolt/compile/basic/Cargo.toml b/tests/jolt/compile/basic/Cargo.toml index 159a48f..d650ddc 100644 --- a/tests/jolt/compile/basic/Cargo.toml +++ b/tests/jolt/compile/basic/Cargo.toml @@ -7,6 +7,6 @@ edition = "2021" guest = [] [dependencies] -jolt = { package = "jolt-sdk", git = "https://github.com/a16z/jolt" } +jolt = { package = "jolt-sdk", git = "https://github.com/a16z/jolt", rev = "55b9830a3944dde55d33a55c42522b81dd49f87a" } [workspace] \ No newline at end of file diff --git a/tests/nexus/guest/Cargo.toml b/tests/nexus/guest/Cargo.toml index f5d5241..586ab82 100644 --- a/tests/nexus/guest/Cargo.toml +++ b/tests/nexus/guest/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2024" [dependencies] -nexus-rt = { git = "https://github.com/nexus-xyz/nexus-zkvm.git", tag = "0.3.4", version = "0.3.4" } +nexus-rt = { git = "https://github.com/nexus-xyz/nexus-zkvm.git", tag = "v0.3.4" } # Generated by cargo-nexus, do not remove! # diff --git a/tests/risc0/compile/basic/Cargo.toml b/tests/risc0/compile/basic/Cargo.toml index 7e40b33..142202d 100644 --- a/tests/risc0/compile/basic/Cargo.toml +++ b/tests/risc0/compile/basic/Cargo.toml @@ -6,4 +6,4 @@ edition = "2021" [workspace] [dependencies] -risc0-zkvm = { version = "^2.3.0", default-features = false, features = ['std'] } +risc0-zkvm = { version = "2.3.1", default-features = false, features = ['std'] } diff --git a/tests/sp1/compile/basic/Cargo.toml b/tests/sp1/compile/basic/Cargo.toml index f10f602..6ba65ff 100644 --- a/tests/sp1/compile/basic/Cargo.toml +++ b/tests/sp1/compile/basic/Cargo.toml @@ -6,4 +6,4 @@ edition = "2021" [workspace] [dependencies] -sp1-zkvm = "5.0.5" +sp1-zkvm = "5.1.0" diff --git a/tests/sp1/execute/basic/Cargo.toml b/tests/sp1/execute/basic/Cargo.toml index f10f602..6ba65ff 100644 --- a/tests/sp1/execute/basic/Cargo.toml +++ b/tests/sp1/execute/basic/Cargo.toml @@ -6,4 +6,4 @@ edition = "2021" [workspace] [dependencies] -sp1-zkvm = "5.0.5" +sp1-zkvm = "5.1.0" diff --git a/tests/sp1/prove/basic/Cargo.toml b/tests/sp1/prove/basic/Cargo.toml index f10f602..6ba65ff 100644 --- a/tests/sp1/prove/basic/Cargo.toml +++ b/tests/sp1/prove/basic/Cargo.toml @@ -6,4 +6,4 @@ edition = "2021" [workspace] [dependencies] -sp1-zkvm = "5.0.5" +sp1-zkvm = "5.1.0"