Skip to content

Commit

Permalink
Changelog and no_std
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kus committed Oct 15, 2024
1 parent b92a4db commit a408cd4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
* Fix prover input.
* Fix version reading when no version is supplied.

* feat: Add support for ByteArray in DebugPrint: [#1853](https://github.com/lambdaclass/cairo-vm/pull/1853)
* Debug print handler is swapped with the implementation from cairo-lang-runner

* chore: bump `cairo-lang-` dependencies to 2.7.1 [#1823](https://github.com/lambdaclass/cairo-vm/pull/1823)

Expand Down
13 changes: 8 additions & 5 deletions vm/src/hint_processor/cairo_1_hint_processor/hint_processor.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use super::dict_manager::DictManagerExecScope;
use super::hint_processor_utils::*;
use crate::any_box;
use crate::hint_processor::cairo_1_hint_processor::debug_print::format_for_debug;
use crate::hint_processor::cairo_1_hint_processor::dict_manager::DictSquashExecScope;
use crate::hint_processor::hint_processor_definition::HintReference;
use crate::stdlib::{boxed::Box, collections::HashMap, prelude::*};
Expand Down Expand Up @@ -109,10 +108,14 @@ impl Cairo1HintProcessor {
remainder,
})) => self.div_mod(vm, lhs, rhs, quotient, remainder),
Hint::Core(CoreHintBase::Core(CoreHint::DebugPrint { start, end })) => {
print!(
"{}",
format_for_debug(read_felts(vm, start, end)?.into_iter())
);
#[cfg(feature = "std")]
{
use crate::hint_processor::cairo_1_hint_processor::debug_print::format_for_debug;
print!(
"{}",
format_for_debug(read_felts(vm, start, end)?.into_iter())
);
}
Ok(())
}
Hint::Core(CoreHintBase::Core(CoreHint::Uint256SquareRoot {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ pub(crate) fn res_operand_get_val(
}

/// Reads a range of `Felt252`s from the VM.
#[cfg(feature = "std")]
pub(crate) fn read_felts(
vm: &mut VirtualMachine,
start: &ResOperand,
Expand Down
1 change: 1 addition & 0 deletions vm/src/hint_processor/cairo_1_hint_processor/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[cfg(feature = "std")]
pub mod debug_print;
pub mod dict_manager;
pub mod hint_processor;
Expand Down

0 comments on commit a408cd4

Please sign in to comment.