Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(WIP) feat: add build scripts to automatically dump correct self prog id of ELF #1716

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
codeblooded1729 committed May 20, 2024
commit d95c03e8a7fda2f72a818e047c036d070896bb5d
4 changes: 2 additions & 2 deletions build_scripts/src/self_prog_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ pub fn dump_self_prog_id(out_elf_name: &str) {
let out_elf_path_str = out_elf_path.to_str().unwrap();
let cli_dir = cargo_manifest_dir_path.join("../cli");

let args = vec!["self-prog-id", out_elf_path_str];
let args = vec!["run", "--release", "--", "self-prog-id", out_elf_path_str];

// execute the cli command `self-prog-id` on the ELF
let output = Command::new("./../target/release/mozak-cli")
let output = Command::new("cargo")
.args(args)
.current_dir(cli_dir)
.env_clear()
Expand Down
8 changes: 0 additions & 8 deletions cli/src/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ fn test_prove_and_verify_recursive_proof_command() {
// Create mock IO tape files
fs::write(system_tape, b"").expect("Failed to create system tape file");

// Get self_prog_id
let output = Command::new("cargo")
.args(["run", "--", "self-prog-id", elf_file])
.output()
.expect("Failed to execute self-prog-id command");
let mut self_prog_id = String::from_utf8(output.stdout).unwrap();
self_prog_id = self_prog_id.trim().to_string();

// Execute the `prove` command
let output = Command::new("cargo")
.args([
Expand Down
Loading