From 0c2bf2a28f4f063758cc77b8aa36d07fdec29b79 Mon Sep 17 00:00:00 2001 From: Rami Khalil Date: Sat, 14 Dec 2024 07:40:43 +0200 Subject: [PATCH 1/4] enable lto in guest builds --- guests/reth-ethereum/Cargo.toml | 13 +++++++++++++ guests/reth-optimism/Cargo.toml | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/guests/reth-ethereum/Cargo.toml b/guests/reth-ethereum/Cargo.toml index 996ed4c4..250cb7fb 100644 --- a/guests/reth-ethereum/Cargo.toml +++ b/guests/reth-ethereum/Cargo.toml @@ -5,6 +5,19 @@ edition = "2021" [workspace] +[profile.dev] +opt-level = 3 + +[profile.dev.build-override] +opt-level = 3 + +[profile.release] +debug = 1 +lto = true + +[profile.release.build-override] +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..80d869b1 100644 --- a/guests/reth-optimism/Cargo.toml +++ b/guests/reth-optimism/Cargo.toml @@ -5,6 +5,19 @@ edition = "2021" [workspace] +[profile.dev] +opt-level = 3 + +[profile.dev.build-override] +opt-level = 3 + +[profile.release] +debug = 1 +lto = true + +[profile.release.build-override] +opt-level = 3 + [dependencies.risc0-zkvm] git = "https://github.com/risc0/risc0" rev = "e98cdad96cfecb3d959cb62abf566e5b17a0d649" From dec32f9d562e688b0536679700661b5a4d78ccfa Mon Sep 17 00:00:00 2001 From: Rami Khalil Date: Sat, 14 Dec 2024 09:27:47 +0200 Subject: [PATCH 2/4] update guest build config --- guests/reth-ethereum/Cargo.toml | 9 ++++++++- guests/reth-optimism/Cargo.toml | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/guests/reth-ethereum/Cargo.toml b/guests/reth-ethereum/Cargo.toml index 250cb7fb..c9712579 100644 --- a/guests/reth-ethereum/Cargo.toml +++ b/guests/reth-ethereum/Cargo.toml @@ -6,16 +6,23 @@ edition = "2021" [workspace] [profile.dev] +codegen-units = 1 +debug = 1 +lto = "fat" opt-level = 3 [profile.dev.build-override] +codegen-units = 1 opt-level = 3 [profile.release] +codegen-units = 1 debug = 1 -lto = true +lto = "fat" +opt-level = 3 [profile.release.build-override] +codegen-units = 1 opt-level = 3 [dependencies.risc0-zkvm] diff --git a/guests/reth-optimism/Cargo.toml b/guests/reth-optimism/Cargo.toml index 80d869b1..db5f1ddb 100644 --- a/guests/reth-optimism/Cargo.toml +++ b/guests/reth-optimism/Cargo.toml @@ -6,16 +6,23 @@ edition = "2021" [workspace] [profile.dev] +codegen-units = 1 +debug = 1 +lto = "fat" opt-level = 3 [profile.dev.build-override] +codegen-units = 1 opt-level = 3 [profile.release] +codegen-units = 1 debug = 1 -lto = true +lto = "fat" +opt-level = 3 [profile.release.build-override] +codegen-units = 1 opt-level = 3 [dependencies.risc0-zkvm] From be48f4a3ac4eb8a0b3af55bf7d0e57052643f56a Mon Sep 17 00:00:00 2001 From: Rami Khalil Date: Tue, 17 Dec 2024 20:10:28 +0200 Subject: [PATCH 3/4] remove dev profile --- guests/reth-ethereum/Cargo.toml | 10 ---------- guests/reth-optimism/Cargo.toml | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/guests/reth-ethereum/Cargo.toml b/guests/reth-ethereum/Cargo.toml index c9712579..beeadfb1 100644 --- a/guests/reth-ethereum/Cargo.toml +++ b/guests/reth-ethereum/Cargo.toml @@ -5,16 +5,6 @@ edition = "2021" [workspace] -[profile.dev] -codegen-units = 1 -debug = 1 -lto = "fat" -opt-level = 3 - -[profile.dev.build-override] -codegen-units = 1 -opt-level = 3 - [profile.release] codegen-units = 1 debug = 1 diff --git a/guests/reth-optimism/Cargo.toml b/guests/reth-optimism/Cargo.toml index db5f1ddb..a77938a9 100644 --- a/guests/reth-optimism/Cargo.toml +++ b/guests/reth-optimism/Cargo.toml @@ -5,16 +5,6 @@ edition = "2021" [workspace] -[profile.dev] -codegen-units = 1 -debug = 1 -lto = "fat" -opt-level = 3 - -[profile.dev.build-override] -codegen-units = 1 -opt-level = 3 - [profile.release] codegen-units = 1 debug = 1 From cbc26b56c10f806514ec417b93030c5fe9e560f0 Mon Sep 17 00:00:00 2001 From: Rami Khalil Date: Wed, 18 Dec 2024 08:41:00 +0200 Subject: [PATCH 4/4] simplify --- guests/reth-ethereum/Cargo.toml | 1 - guests/reth-optimism/Cargo.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/guests/reth-ethereum/Cargo.toml b/guests/reth-ethereum/Cargo.toml index beeadfb1..2102f264 100644 --- a/guests/reth-ethereum/Cargo.toml +++ b/guests/reth-ethereum/Cargo.toml @@ -9,7 +9,6 @@ edition = "2021" codegen-units = 1 debug = 1 lto = "fat" -opt-level = 3 [profile.release.build-override] codegen-units = 1 diff --git a/guests/reth-optimism/Cargo.toml b/guests/reth-optimism/Cargo.toml index a77938a9..29ba809d 100644 --- a/guests/reth-optimism/Cargo.toml +++ b/guests/reth-optimism/Cargo.toml @@ -9,7 +9,6 @@ edition = "2021" codegen-units = 1 debug = 1 lto = "fat" -opt-level = 3 [profile.release.build-override] codegen-units = 1