Skip to content

Commit

Permalink
compile module in no-std
Browse files Browse the repository at this point in the history
  • Loading branch information
odesenfans committed Mar 7, 2024
1 parent 9cac9db commit cdb2b59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion vm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ pub mod air_public_input;
pub mod cairo_run;
pub mod hint_processor;
pub mod math_utils;
#[cfg(feature = "std")] // TODO review: I'm not sure of how to specify an std-only module
pub mod program_hash;
pub mod serde;
pub mod types;
Expand Down
7 changes: 4 additions & 3 deletions vm/src/program_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use starknet_crypto::{pedersen_hash, FieldElement};
use crate::Felt252;

use crate::serde::deserialize_program::BuiltinName;
use crate::stdlib::vec::Vec;
use crate::types::relocatable::MaybeRelocatable;
use crate::vm::runners::cairo_pie::StrippedProgram;

Expand Down Expand Up @@ -144,10 +145,9 @@ pub fn compute_program_hash_chain(

#[cfg(test)]
mod tests {
use std::path::PathBuf;
#[cfg(feature = "std")]
use {crate::types::program::Program, rstest::rstest, std::path::PathBuf};

use crate::types::program::Program;
use rstest::rstest;
use starknet_crypto::pedersen_hash;

use super::*;
Expand All @@ -169,6 +169,7 @@ mod tests {
assert_eq!(computed_hash, expected_hash);
}

#[cfg(feature = "std")]
#[rstest]
// Expected hashes generated with `cairo-hash-program`
#[case::fibonacci(
Expand Down

0 comments on commit cdb2b59

Please sign in to comment.