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§
Structs§
- Compiler
Config - 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()andcompile_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
.cairofile (a single crate), or a directory with acairo_project.tomlfile. - compile_
prepared_ db - Runs Cairo compiler.
- compile_
prepared_ db_ program - Runs Cairo compiler.
- compile_
prepared_ db_ program_ artifact - Runs Cairo compiler for specified crates.
- compile_
prepared_ db_ program_ artifact_ for_ functions - Runs Cairo compiler for specified functions.
- ensure_
diagnostics - Checks if there are diagnostics and reports them to the provided callback as strings.
Returns
Errif diagnostics were found. - 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