cairo_lang_sierra/
lib.rs

1//! Sierra is an intermediate representation between high level Cairo and compilation targets,
2//! such as CASM. Sierra code is guaranteed to be "safe"* by construction.
3//! Sierra has a primitive, yet rich typing system to express all high level code while guaranteeing
4//! safety and allowing for efficient compilation down to the target.
5//!
6//! Safety - this means a few things:
7//! 1. There are no "panics" / "runtime errors". Every function is guaranteed to return.
8//! 2. There are no infinite loops. Moreover, every program "counts" its own steps, and returns when
9//!    the limit is reached.
10//! 3. Builtin library functions are always used correctly.
11
12use lalrpop_util::lalrpop_mod;
13
14pub mod algorithm;
15pub mod debug_info;
16pub mod edit_state;
17pub mod extensions;
18pub mod fmt;
19pub mod ids;
20mod pre_statement;
21pub mod program;
22pub mod program_registry;
23pub mod simulation;
24#[cfg(test)]
25mod test_utils;
26
27lalrpop_mod!(
28    #[allow(clippy::all, unused_extern_crates)]
29    parser
30);
31
32pub type ProgramParser = parser::ProgramParser;
33pub type ConcreteLibfuncLongIdParser = parser::ConcreteLibfuncLongIdParser;
34pub type ConcreteTypeLongIdParser = parser::ConcreteTypeLongIdParser;