Function compile_executable_function_in_prepared_db

Source
pub fn compile_executable_function_in_prepared_db(
    db: &RootDatabase,
    executable: ConcreteFunctionWithBodyId,
    diagnostics_reporter: DiagnosticsReporter<'_>,
    config: ExecutableConfig,
) -> Result<CompiledFunction>
Expand description

Runs compiler for an executable function.

§Arguments

  • db - Preloaded compilation database.
  • executable - ConcreteFunctionWithBodyIds to compile.
  • diagnostics_reporter - The diagnostics reporter.
  • config - If true, the compilation will not fail if the program is not sound.

§Returns

  • Ok(Vec<String>) - The result artifact of the compilation.
  • Err(anyhow::Error) - Compilation failed.