foundry_common::compile

Function compile_target

Source
pub fn compile_target<C: Compiler<CompilerContract = Contract>>(
    target_path: &Path,
    project: &Project<C>,
    quiet: bool,
) -> Result<ProjectCompileOutput<C>>
Expand description

Compiles target file path.

If quiet no solc related output will be emitted to stdout.

If verify and it’s a standalone script, throw error. Only allowed for projects.

Note: this expects the target_path to be absolute