Skip to content

Commit 43a3c72

Browse files
use a different program as an example
1 parent ebc6cab commit 43a3c72

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

cairo1-run/src/cairo_run.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ use cairo_lang_utils::{
3535
bigint::BigIntAsHex, casts::IntoOrPanic, unordered_hash_map::UnorderedHashMap,
3636
};
3737
use cairo_vm::{
38-
stdlib::{collections::HashMap, iter::Peekable},
3938
hint_processor::cairo_1_hint_processor::hint_processor::Cairo1HintProcessor,
4039
math_utils::signed_felt,
4140
serde::deserialize_program::{ApTracking, FlowTrackingData, HintParams, ReferenceManager},
41+
stdlib::{collections::HashMap, iter::Peekable},
4242
types::{
4343
builtin_name::BuiltinName, layout::CairoLayoutParams, layout_name::LayoutName,
4444
program::Program, relocatable::MaybeRelocatable,

examples/wasm-demo-cairo1/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To compile and run the example you need:
2323
To build the example, first you need to compile your Cairo Program, using either cairo 1 or cairo 2 compiler:
2424

2525
```sh
26-
cairo-compile -rs ../../cairo_programs/cairo-1-programs/serialized_output/bitwise.cairo ../../cairo_programs/cairo-1-programs/serialized_output/bitwise.sierra
26+
cairo-compile -rs ../../cairo_programs/cairo-1-programs/bitwise.cairo ../../cairo_programs/cairo-1-programs/bitwise.sierra
2727
```
2828

2929
> WARNING: This example uses `cairo1-run::cairo_run_program` which expectes the program to be compiled with debug names. By default, `cairo-compile` does not include debug names in sierra. Due to this, the flag `-r` or `--replace-ids` is needed.

examples/wasm-demo-cairo1/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
mod utils;
22

33
use cairo1_run::Cairo1RunConfig;
4-
use cairo_lang_sierra::{ProgramParser};
4+
use cairo_lang_sierra::ProgramParser;
55
use cairo_vm::types::layout_name::LayoutName;
66
use wasm_bindgen::prelude::*;
77

@@ -34,7 +34,8 @@ pub fn run_cairo_program() -> Result<String, JsError> {
3434
..Default::default()
3535
};
3636

37-
let program_str = include_str!("../../../cairo_programs/cairo-1-programs/serialized_output/bitwise.sierra");
37+
let program_str =
38+
include_str!("../../../cairo_programs/cairo-1-programs/bitwise.sierra");
3839

3940
let sierra_program = ProgramParser::new().parse(program_str)?;
4041

0 commit comments

Comments
 (0)