@@ -60,32 +60,32 @@ fn main() {
6060 true
6161 } ;
6262
63- if needs_build {
64- sp1_build:: build_program_with_args ( "./aggregation_programs/sp1" , {
65- sp1_build:: BuildArgs {
66- output_directory : Some ( "./aggregation_programs/sp1/elf" . to_string ( ) ) ,
67- // We use Docker to generate a reproducible ELF that will be identical across all platforms
68- // (https://docs.succinct.xyz/docs/sp1/writing-programs/compiling#production-builds)
69- docker : true ,
70- ..Default :: default ( )
71- }
72- } ) ;
63+ if !needs_build {
64+ return ;
65+ }
7366
74- // With this containerized build process, we ensure that all builds of the guest code,
75- // regardless of the machine or local environment, will produce the same ImageID
76- let docker_options = DockerOptionsBuilder :: default ( ) . build ( ) . unwrap ( ) ;
77- // Reference: https://github.com/risc0/risc0/blob/main/risc0/build/src/config.rs#L73-L90
78- let guest_options = GuestOptionsBuilder :: default ( )
79- . use_docker ( docker_options)
80- . build ( )
81- . unwrap ( ) ;
82- risc0_build:: embed_methods_with_options ( HashMap :: from ( [ (
83- "risc0_aggregation_program" ,
84- guest_options,
85- ) ] ) ) ;
67+ sp1_build:: build_program_with_args ( "./aggregation_programs/sp1" , {
68+ sp1_build:: BuildArgs {
69+ output_directory : Some ( "./aggregation_programs/sp1/elf" . to_string ( ) ) ,
70+ // We use Docker to generate a reproducible ELF that will be identical across all platforms
71+ // (https://docs.succinct.xyz/docs/sp1/writing-programs/compiling#production-builds)
72+ docker : true ,
73+ ..Default :: default ( )
74+ }
75+ } ) ;
8676
87- fs:: write ( hash_file, hash) . unwrap ( ) ;
88- } else {
89- println ! ( "Programs code unchanged — skipping programs build" ) ;
90- }
77+ // With this containerized build process, we ensure that all builds of the guest code,
78+ // regardless of the machine or local environment, will produce the same ImageID
79+ let docker_options = DockerOptionsBuilder :: default ( ) . build ( ) . unwrap ( ) ;
80+ // Reference: https://github.com/risc0/risc0/blob/main/risc0/build/src/config.rs#L73-L90
81+ let guest_options = GuestOptionsBuilder :: default ( )
82+ . use_docker ( docker_options)
83+ . build ( )
84+ . unwrap ( ) ;
85+ risc0_build:: embed_methods_with_options ( HashMap :: from ( [ (
86+ "risc0_aggregation_program" ,
87+ guest_options,
88+ ) ] ) ) ;
89+
90+ fs:: write ( hash_file, hash) . unwrap ( ) ;
9191}
0 commit comments