Function cargo::core::compiler::custom_build::build_work

source ยท
fn build_work(
    build_runner: &mut BuildRunner<'_, '_>,
    unit: &Unit,
) -> CargoResult<Job>
Expand description

Constructs the unit of work of running a build script.

The construction includes:

  • Set environment variables for the build script run.
  • Create the output dir (OUT_DIR) for the build script output.
  • Determine if the build script needs a re-run.
  • Run the build script and store its output.