From 392b34ca0c678800a657a4280f6ad7414d7f3837 Mon Sep 17 00:00:00 2001 From: Rami <2418646+hashcashier@users.noreply.github.com> Date: Wed, 18 Dec 2024 08:41:26 +0200 Subject: [PATCH] Perf: Optimize guest builds (#130) * enable lto in guest builds * update guest build config * remove dev profile * simplify --- guests/reth-ethereum/Cargo.toml | 9 +++++++++ guests/reth-optimism/Cargo.toml | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/guests/reth-ethereum/Cargo.toml b/guests/reth-ethereum/Cargo.toml index 996ed4c4..2102f264 100644 --- a/guests/reth-ethereum/Cargo.toml +++ b/guests/reth-ethereum/Cargo.toml @@ -5,6 +5,15 @@ edition = "2021" [workspace] +[profile.release] +codegen-units = 1 +debug = 1 +lto = "fat" + +[profile.release.build-override] +codegen-units = 1 +opt-level = 3 + [dependencies.risc0-zkvm] git = "https://github.com/risc0/risc0" rev = "e98cdad96cfecb3d959cb62abf566e5b17a0d649" diff --git a/guests/reth-optimism/Cargo.toml b/guests/reth-optimism/Cargo.toml index 90a67309..29ba809d 100644 --- a/guests/reth-optimism/Cargo.toml +++ b/guests/reth-optimism/Cargo.toml @@ -5,6 +5,15 @@ edition = "2021" [workspace] +[profile.release] +codegen-units = 1 +debug = 1 +lto = "fat" + +[profile.release.build-override] +codegen-units = 1 +opt-level = 3 + [dependencies.risc0-zkvm] git = "https://github.com/risc0/risc0" rev = "e98cdad96cfecb3d959cb62abf566e5b17a0d649"