Crate cairo_lang_compiler

Source
Expand description

Cairo compiler.

This crate is responsible for compiling a Cairo project into a Sierra program. It is the main entry point for the compiler.

Modules§

db
diagnostics
project

Structs§

CompilerConfig
Configuration for the compiler.

Functions§

compile
Compiles a Cairo project. The project must be a valid Cairo project. This function is a wrapper over RootDatabase::builder() and compile_prepared_db_program.
compile_cairo_project_at_path
Compiles a Cairo project at the given path. The project must be a valid Cairo project: Either a standalone .cairo file (a single crate), or a directory with a cairo_project.toml file.
compile_prepared_db
Runs Cairo compiler.
compile_prepared_db_program
Runs Cairo compiler.
compile_prepared_db_program_artifact
Runs Cairo compiler.
get_sierra_program_for_functions
Checks if there are diagnostics in the database and if there are None, returns the SierraProgramWithDebug object of the requested functions