Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion crates/apollo_compile_to_native/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@

pub(crate) const CAIRO_NATIVE_BINARY_NAME: &str = "starknet-native-compile";

pub const REQUIRED_CAIRO_NATIVE_VERSION: &str = "0.9.0-rc.6";
pub const REQUIRED_CAIRO_NATIVE_VERSION: &str =
include_str!("native_compiler_version.txt").trim_ascii_end();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.9.0-rc.6
3 changes: 2 additions & 1 deletion crates/apollo_infra_utils/src/cairo_compiler_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
#[path = "cairo_compiler_version_test.rs"]
mod cairo_compiler_version_test;

pub const CAIRO1_COMPILER_VERSION: &str = "2.17.0-rc.4";
pub const CAIRO1_COMPILER_VERSION: &str =
include_str!("cairo_compiler_version.txt").trim_ascii_end();
1 change: 1 addition & 0 deletions crates/apollo_infra_utils/src/cairo_compiler_version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.17.0-rc.4
12 changes: 7 additions & 5 deletions crates/apollo_infra_utils/src/cairo_compiler_version_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ use serde::{Deserialize, Serialize};

use crate::cairo_compiler_version::CAIRO1_COMPILER_VERSION;

/// Objects for simple deserialization of `Cargo.toml`, to fetch the Cairo1 compiler version.
/// The compiler itself isn't actually a dependency, so we compile by using the version of the
/// `cairo-lang-casm` crate.
/// The choice of this crate is arbitrary, as all compiler crate dependencies should have the
/// same version.
/// Cross-checks that `CAIRO1_COMPILER_VERSION` (loaded from `cairo_compiler_version.txt`,
/// which the install scripts also read) matches the `cairo-lang-casm` version pinned in
/// `Cargo.toml`. The two are managed independently: the `.txt` file drives the external
/// compiler binary install, the Cargo dep drives the in-process Sierra crates. They must
/// stay in sync; this test fires on drift.
/// The choice of `cairo-lang-casm` is arbitrary, as all compiler crate dependencies should
/// have the same version.
/// Deserializes:
/// """
/// ...
Expand Down
Loading