diff --git a/prover/Cargo.toml b/prover/Cargo.toml index 5e45a29d..778cd02c 100644 --- a/prover/Cargo.toml +++ b/prover/Cargo.toml @@ -48,3 +48,6 @@ plonky2x-derive = { git = "https://github.com/zkMIPS/succinctx.git", package = " [features] test = [] + +[profile.release] +debug = true diff --git a/prover/examples/README.md b/prover/examples/README.md index 8fc94a60..b5f2eabf 100644 --- a/prover/examples/README.md +++ b/prover/examples/README.md @@ -50,6 +50,8 @@ RUST_LOG=info ELF_PATH=examples/add-go/go-add HOST_PROGRAM=add_example SEG_OUTPU ## Prove the Rust code +**Note**: the "mips-linux-muslsf-cross" supports Linux only. If your are using a MacOS, please refer to [#147](https://github.com/zkMIPS/zkm/issues/147). + * Download and install toolchain for mips ``` @@ -69,7 +71,7 @@ rustflags = ["--cfg", 'target_os="zkvm"',"-C", "target-feature=+crt-static", "-C ``` cd prover/examples/sha2-rust -cargo build --target=mips-unknown-linux-musl +cargo build -r --target=mips-unknown-linux-musl ``` * Run the host program @@ -80,9 +82,9 @@ cargo build --target=mips-unknown-linux-musl cd ../.. -ARGS="711e9609339e92b03ddc0a211827dba421f38f9ed8b9d806e1ffdd8c15ffa03d world!" RUST_LOG=info ELF_PATH=examples/sha2-rust/target/mips-unknown-linux-musl/debug/sha2-rust HOST_PROGRAM=sha2_rust SEG_OUTPUT=/tmp/output cargo run --release --example zkmips prove_host_program +ARGS="711e9609339e92b03ddc0a211827dba421f38f9ed8b9d806e1ffdd8c15ffa03d world!" RUST_LOG=info ELF_PATH=examples/sha2-rust/target/mips-unknown-linux-musl/release/sha2-rust HOST_PROGRAM=sha2_rust SEG_OUTPUT=/tmp/output cargo run --release --example zkmips prove_host_program Or -RUST_LOG=info ELF_PATH=examples/revme/target/mips-unknown-linux-musl/debug/evm HOST_PROGRAM=revm JSON_PATH=../emulator/test-vectors/test.json SEG_OUTPUT=/tmp/output SEG_SIZE=262144 cargo run --release --example zkmips prove_host_program +RUST_LOG=info ELF_PATH=examples/revme/target/mips-unknown-linux-musl/release/evm HOST_PROGRAM=revm JSON_PATH=../emulator/test-vectors/test.json SEG_OUTPUT=/tmp/output SEG_SIZE=262144 cargo run --release --example zkmips prove_host_program ``` diff --git a/prover/examples/sha2-rust/Cargo.lock b/prover/examples/sha2-rust/Cargo.lock index 28d0aeff..6f264411 100644 --- a/prover/examples/sha2-rust/Cargo.lock +++ b/prover/examples/sha2-rust/Cargo.lock @@ -225,6 +225,7 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "zkm-precompiles" version = "0.1.0" +source = "git+https://github.com/zkMIPS/zkm#ab68657c118b076c430cef3a303a267a9ade88c7" dependencies = [ "bincode", "cfg-if", @@ -234,6 +235,7 @@ dependencies = [ [[package]] name = "zkm-runtime" version = "0.1.0" +source = "git+https://github.com/zkMIPS/zkm#ab68657c118b076c430cef3a303a267a9ade88c7" dependencies = [ "bincode", "cfg-if", diff --git a/prover/examples/sha2-rust/Cargo.toml b/prover/examples/sha2-rust/Cargo.toml index b9dedc44..b5485569 100644 --- a/prover/examples/sha2-rust/Cargo.toml +++ b/prover/examples/sha2-rust/Cargo.toml @@ -5,5 +5,5 @@ name = "sha2-rust" edition = "2021" [dependencies] -zkm-runtime = { path = "../../../runtime/entrypoint" } +zkm-runtime = { git = "https://github.com/zkMIPS/zkm", package = "zkm-runtime" } sha2 = { version = "0.10.8", default-features = false }