Add build_function_implicit_args helper#297
Conversation
aea8c20 to
ca804ce
Compare
OmriEshhar1
left a comment
There was a problem hiding this comment.
@OmriEshhar1 reviewed 3 files and all commit messages, and made 3 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @naor-starkware).
a discussion (no related file):
fix conflicts and failed tests
a discussion (no related file):
please get @YairVaknin-starkware (or someone else that knows this code) review it.
crates/cairo-program-runner/src/bin/cairo_program_runner/main.rs line 16 at r2 (raw file):
use cairo_vm::vm::errors::cairo_run_errors::CairoRunError; use clap::Parser; use tempfile::NamedTempFile;
revert changes in this file (add / remove empty lines).
OmriEshhar1
left a comment
There was a problem hiding this comment.
@OmriEshhar1 made 1 comment.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @naor-starkware).
crates/cairo-program-runner-lib/src/utils.rs line 136 at r2 (raw file):
Ok(()) } // Builds the implicit arguments (builtin pointers, syscall_ptr) for a specific Cairo function
add empty line above
and add missing / at the beginning of the line
OmriEshhar1
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @naor-starkware and @YairVaknin-starkware).
ca804ce to
152d687
Compare
naor-starkware
left a comment
There was a problem hiding this comment.
@naor-starkware made 2 comments.
Reviewable status: 1 of 3 files reviewed, 4 unresolved discussions (waiting on @OmriEshhar1 and @YairVaknin-starkware).
crates/cairo-program-runner/src/bin/cairo_program_runner/main.rs line 16 at r2 (raw file):
Previously, OmriEshhar1 wrote…
revert changes in this file (add / remove empty lines).
Done.
crates/cairo-program-runner-lib/src/utils.rs line 136 at r2 (raw file):
Previously, OmriEshhar1 wrote…
add empty line above
and add missing / at the beginning of the line
Done.
OmriEshhar1
left a comment
There was a problem hiding this comment.
@OmriEshhar1 reviewed 2 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @naor-starkware and @YairVaknin-starkware).
crates/cairo-program-runner/src/bin/cairo_program_runner/main.rs line 16 at r2 (raw file):
Previously, naor-starkware wrote…
Done.
there's still a diff (add empty line above parse_bool() function)
crates/cairo-program-runner-lib/src/utils.rs line 136 at r2 (raw file):
Previously, naor-starkware wrote…
Done.
there's still a missing / (the first line of the documentation should start with ///, not //).
e3657b6 to
cdab88e
Compare
OmriEshhar1
left a comment
There was a problem hiding this comment.
@OmriEshhar1 reviewed 2 files and all commit messages, and resolved 1 discussion.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @naor-starkware and @YairVaknin-starkware).
OmriEshhar1
left a comment
There was a problem hiding this comment.
@OmriEshhar1 resolved 1 discussion.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @naor-starkware and @YairVaknin-starkware).
ea563ef to
6b2e9de
Compare
6b2e9de to
644be45
Compare
OmriEshhar1
left a comment
There was a problem hiding this comment.
@OmriEshhar1 reviewed 5 files and all commit messages, and made 9 comments.
Reviewable status: all files reviewed, 9 unresolved discussions (waiting on naor-starkware and YairVaknin-starkware).
crates/cairo-program-runner/src/bin/cairo_program_runner/main.rs line 16 at r2 (raw file):
Previously, OmriEshhar1 wrote…
there's still a diff (add empty line above parse_bool() function)
revert change
crates/cairo-program-runner-lib/src/utils.rs line 52 at r5 (raw file):
/// /// This function checks if an input file is provided. If so, it returns the path wrapped /// as `ProgramInput::Path`. If no input fise is provided, it returns `Ok(None)`.
revert change
Code quote:
fisecrates/cairo-function-runner/src/lib.rs line 16 at r5 (raw file):
/// /// This struct provides a high-level interface for running individual Cairo functions with /// automatic builtin initialization, similar to the Python implementation.
no need to mention the Python implementation (it should be deleted later, so it's better not to reference it.)
(here and below).
Code quote:
/// A Cairo function runner that mimics the behavior of the Python VM's CairoFunctionRunner.
///
/// This struct provides a high-level interface for running individual Cairo functions with
/// automatic builtin initialization, similar to the Python implementation.crates/cairo-function-runner/src/lib.rs line 16 at r5 (raw file):
/// /// This struct provides a high-level interface for running individual Cairo functions with /// automatic builtin initialization, similar to the Python implementation.
Mention that this is used for testing purposes only.
Code quote:
/// A Cairo function runner that mimics the behavior of the Python VM's CairoFunctionRunner.
///
/// This struct provides a high-level interface for running individual Cairo functions with
/// automatic builtin initialization, similar to the Python implementation.crates/cairo-function-runner/src/lib.rs line 48 at r5 (raw file):
let mut runner = CairoRunner::new( program, LayoutName::all_cairo,
I think that lambdaclass are now removing 'layout' from the cairo-vm.
but I guess we can worry about this later.
Code quote:
LayoutName::all_cairo,crates/cairo-function-runner/src/lib.rs line 89 at r5 (raw file):
/// - Execution fails (VM errors, hint errors, etc.) /// - Security verification fails (if `verify_secure` is true) pub fn run(
I see that there are many arguments in the Python run() that are not here. Are you planning to add them later?
if so, add a TODO.
crates/cairo-function-runner/src/lib.rs line 93 at r5 (raw file):
entrypoint: &str, verify_secure: bool, program_segment_size: Option<usize>,
I see that program_segment_size is not used in the Python run() function.
do you need it here?
Code quote:
program_segment_size: Option<usize>,crates/cairo-function-runner/Cargo.toml line 7 at r5 (raw file):
license.workspace = true repository.workspace = true description = "CairoFunctionRunner for demonstrating Python VM builtin initialization"
Python?
Code quote:
Pythoncrates/cairo-function-runner/Cargo.toml line 13 at r5 (raw file):
path = "src/lib.rs" [dependencies]
sort the dependencies alphabetically
Type
Description
Breaking changes?
This change is