Skip to content

Commit

Permalink
use new powdr API
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo Alt committed Jan 26, 2024
1 parent 7d5911f commit 56ffff5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bin-powdr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
powdr = { git = "https://github.com/powdr-labs/powdr", branch = "continuations-data-input" }
powdr = { git = "https://github.com/powdr-labs/powdr", branch = "main" }
env_logger = "0.10.0"
16 changes: 7 additions & 9 deletions bin-powdr/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
use powdr::number::GoldilocksField;
use powdr::riscv::{compile_rust, CoProcessors};
use powdr::pipeline::{
pipeline::Pipeline,
test_util::verify_pipeline
};
use powdr::GoldilocksField;
use powdr::{pipeline::test_util::verify_pipeline, Pipeline};
use std::path::{Path, PathBuf};

// Step1: set PILCOM to path (https://github.com/0xPolygonHermez/pilcom)
// Step2: cargo run --package bin-powdr --bin bin-powdr --all-features
// Step2: cargo run --package bin-powdr --bin bin-powdr --all-features
///
/// Note:
/// revm dependencies located in workspace as well as in the guest-powdr/Cargo.toml
Expand All @@ -28,10 +25,11 @@ fn main() {
.unwrap();
println!("Compilation done.");
println!("Creating pipeline...");
let pipeline: Pipeline<GoldilocksField> =
Pipeline::default().from_asm_string(asm_contents, Some(PathBuf::from(asm_file_path)));
let pipeline: Pipeline<GoldilocksField> = Pipeline::default()
.from_asm_string(asm_contents, Some(PathBuf::from(asm_file_path)))
.with_prover_inputs(vec![]);
println!("Pipeline done.");
println!("Verifying pipeline...");
verify_pipeline(pipeline, Vec::new(), Vec::new());
verify_pipeline(pipeline);
println!("Verification done.");
}
2 changes: 1 addition & 1 deletion guest-powdr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ zeth-lib = { path = "../lib", default-features = false }
zeth-primitives = { path = "../primitives", features = ["revm"] }
revm = { git = "https://github.com/powdr-labs/revm", branch = "serde-no-std", default-features = false, features = [ "serde" ] }
ruint = { version = "1.10", default-features = false }
powdr_riscv_rt = { git = "https://github.com/powdr-labs/powdr", branch = "continuations-data-input" }
powdr-riscv-runtime = { git = "https://github.com/powdr-labs/powdr", branch = "main" }

# TODO: we need to add this for compatibility reasons until we're able to update the nightly we use for riscv compilation
ahash = { version = "=0.8.6", default-features = false }
Expand Down

0 comments on commit 56ffff5

Please sign in to comment.