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

Add air_public_input flag to cairo1-run #1539

Merged
merged 21 commits into from
Jan 15, 2024
Merged
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 typo
fmoletta committed Jan 8, 2024
commit efda66e8253b383765dd4a23feba054109b44ca8
2 changes: 1 addition & 1 deletion cairo1-run/src/main.rs
Original file line number Diff line number Diff line change
@@ -176,11 +176,11 @@
fn run(args: impl Iterator<Item = String>) -> Result<Vec<MaybeRelocatable>, Error> {
let args = Args::try_parse_from(args)?;
if args.air_public_input.is_some() && !args.proof_mode {
let error = Args::command().error(
clap::error::ErrorKind::ArgumentConflict,
"--air_public_input can only be used in proof_mode.",
);
return Err(Error::Cli(error));

Check warning on line 183 in cairo1-run/src/main.rs

Codecov / codecov/patch

cairo1-run/src/main.rs#L179-L183

Added lines #L179 - L183 were not covered by tests
}

let compiler_config = CompilerConfig {
@@ -377,17 +377,17 @@
for (id, size) in ret_types_and_sizes {
if let Some(ref name) = id.debug_name {
let mut builtin_name = name.to_lowercase();
// This could be avoided by propery converting between UpperCamelCase & snake_case
// This could be avoided by properly converting between UpperCamelCase & snake_case
// But given the limited amount of cases it is possible to handle it manually instead of adding an external dependency
if builtin_name == "rangecheck" {
builtin_name = "range_check".to_string();
}
if builtin_name == "ecop" {
builtin_name = "ec_op".to_string();

Check warning on line 386 in cairo1-run/src/main.rs

Codecov / codecov/patch

cairo1-run/src/main.rs#L386

Added line #L386 was not covered by tests
}
builtin_name = format!("{}_builtin", builtin_name.to_lowercase());
builtin_name_to_stack_pointer.insert(builtin_name, stack_pointer);
}

Check warning on line 390 in cairo1-run/src/main.rs

Codecov / codecov/patch

cairo1-run/src/main.rs#L390

Added line #L390 was not covered by tests
stack_pointer.offset += size as usize;
}
// Set stop pointer for each builtin