From 9283a39932e162384072a5863ed86ab23dd72732 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Fri, 22 Mar 2024 13:08:27 +0100 Subject: [PATCH] rust packages pinpointed --- Cargo.toml | 12 ++++++------ runner/src/main.rs | 12 ++++++++++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f50202ad2..cb08facd4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,12 +9,12 @@ version = "0.1.0" [workspace.dependencies] anyhow = "1" cairo-felt = "0.9" -cairo-lang-casm = { git = "https://github.com/starkware-libs/cairo/" } -cairo-lang-runner = { git = "https://github.com/starkware-libs/cairo/" } -cairo-lang-sierra = { git = "https://github.com/starkware-libs/cairo/" } -cairo-lang-utils = { git = "https://github.com/starkware-libs/cairo/" } -cairo-proof-parser = { git = "https://github.com/Okm165/cairo-proof-parser" } -cairo-vm = "=0.9.2" +cairo-lang-casm = { git = "https://github.com/starkware-libs/cairo/", rev = "4471a55923663eb8150ea6cd636d5c1038b137d1"} +cairo-lang-runner = { git = "https://github.com/starkware-libs/cairo/", rev = "4471a55923663eb8150ea6cd636d5c1038b137d1"} +cairo-lang-sierra = { git = "https://github.com/starkware-libs/cairo/", rev = "4471a55923663eb8150ea6cd636d5c1038b137d1"} +cairo-lang-utils = { git = "https://github.com/starkware-libs/cairo/", rev = "4471a55923663eb8150ea6cd636d5c1038b137d1"} +cairo-proof-parser = { git = "https://github.com/Okm165/cairo-proof-parser", rev = "97a04bbee07330311b38d6f4cecfed3acb237626"} +cairo-vm = "0.9.2" clap = { version = "4.5.2", features = ["derive"] } itertools = "0.12.0" num-bigint = "0.4.4" diff --git a/runner/src/main.rs b/runner/src/main.rs index b062e25aa..9996e10ba 100644 --- a/runner/src/main.rs +++ b/runner/src/main.rs @@ -1,7 +1,7 @@ mod vec252; use crate::vec252::VecFelt252; -use cairo_lang_runner::{Arg, ProfilingInfoCollectionConfig, SierraCasmRunner}; +use cairo_lang_runner::{Arg, ProfilingInfoCollectionConfig, RunResultValue, SierraCasmRunner}; use cairo_lang_sierra::program::VersionedProgram; use cairo_lang_utils::ordered_hash_map::OrderedHashMap; use cairo_proof_parser::parse; @@ -69,7 +69,15 @@ fn main() -> anyhow::Result<()> { println!("gas_counter: {}", result.gas_counter.unwrap()); println!("n_steps: {}", result.memory.len()); - println!("return: {:#?}", result.value); + + match result.value { + RunResultValue::Success(msg) => { + println!("{:?}", msg); + } + RunResultValue::Panic(msg) => { + panic!("{:?}", msg); + } + } Ok(()) }