compile_executable_function_in_prepared_db

Function compile_executable_function_in_prepared_db 

Source
pub fn compile_executable_function_in_prepared_db<'db>(
    db: &'db dyn Database,
    executable: ConcreteFunctionWithBodyId<'db>,
    config: ExecutableConfig,
) -> Result<CompileExecutableResult<'db>>
Expand description

Runs the executable compiler on the specified function in a prepared database.

Diagnostics are expected to have been checked by the caller (for example via compile_executable_in_prepared_db).

§Arguments

  • db - Preloaded compilation database.
  • executable - The ConcreteFunctionWithBodyId to compile.
  • config - Configuration for executables (e.g. syscall allowance and panic behavior).

§Returns

  • Ok(CompileExecutableResult<'db>) - The compiled CASM program and associated metadata.
  • Err(anyhow::Error) - Compilation failed.