cairo_lang_compiler

Function compile_cairo_project_at_path

source
pub fn compile_cairo_project_at_path(
    path: &Path,
    compiler_config: CompilerConfig<'_>,
) -> Result<Program>
Expand description

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.

§Arguments

  • path - The path to the project.
  • compiler_config - The compiler configuration.

§Returns

  • Ok(Program) - The compiled program.
  • Err(anyhow::Error) - Compilation failed.