Skip to content

Commit

Permalink
add forge ffi build into build script
Browse files Browse the repository at this point in the history
  • Loading branch information
capossele committed Mar 5, 2024
1 parent 1a3d42f commit f8f3695
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion methods/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::{collections::HashMap, env};
use std::{collections::HashMap, env, process::Command};

use risc0_build::{embed_methods_with_options, DockerOptions, GuestOptions};
use risc0_build_ethereum::generate_solidity_files;
Expand Down Expand Up @@ -43,4 +43,20 @@ fn main() {
.with_elf_sol_path(SOLIDITY_ELF_PATH);

generate_solidity_files(guests.as_slice(), &solidity_opts).unwrap();

// build risc0-ethereum forge ffi.
let status = Command::new("cargo")
.arg("build")
.arg("--manifest-path")
.arg("../lib/risc0-ethereum/ffi/Cargo.toml")
.arg("--bin")
.arg("risc0-forge-ffi")
.status()
.unwrap();
if !status.success() {
panic!(
"risc0-ethereum forge ffi build failed with exit code: {:?}",
status.code()
);
}
}

0 comments on commit f8f3695

Please sign in to comment.