Step

Trait Step 

Source
pub trait Step:
    'static
    + Clone
    + Debug
    + PartialEq
    + Eq
    + Hash {
    type Output: Clone;

    const IS_HOST: bool = false;

    // Required methods
    fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_>;
    fn run(self, builder: &Builder<'_>) -> Self::Output;

    // Provided methods
    fn is_default_step(_builder: &Builder<'_>) -> bool { ... }
    fn make_run(_run: RunConfig<'_>) { ... }
    fn metadata(&self) -> Option<StepMetadata> { ... }
}

Provided Associated Constants§

Source

const IS_HOST: bool = false

If this value is true, then the values of run.target passed to the make_run function of this Step will be determined based on the --host flag. If this value is false, then they will be determined based on the --target flag.

A corollary of the above is that if this is set to true, then the step will be skipped if --target was specified, but --host was explicitly set to ‘’ (empty string).

Required Associated Types§

Source

type Output: Clone

Result type of Step::run.

Required Methods§

Source

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_>

Called to allow steps to register the command-line paths that should cause them to run.

Source

fn run(self, builder: &Builder<'_>) -> Self::Output

Primary function to implement Step logic.

This function can be triggered in two ways:

  1. Directly from Builder::execute_cli.
  2. Indirectly by being called from other Steps using Builder::ensure.

When called with Builder::execute_cli (as done by Build::build), this function is executed twice:

  • First in “dry-run” mode to validate certain things (like cyclic Step invocations, directory creation, etc) super quickly.
  • Then it’s called again to run the actual, very expensive process.

When triggered indirectly from other Steps, it may still run twice (as dry-run and real mode) depending on the Step::run implementation of the caller.

Provided Methods§

Source

fn is_default_step(_builder: &Builder<'_>) -> bool

Should this step run when the user invokes bootstrap with a subcommand but no paths/aliases?

For example, ./x test runs all default test steps, and ./x dist runs all default dist steps.

Most steps are always default or always non-default, and just return true or false. But some steps are conditionally default, based on bootstrap config or the availability of ambient tools.

If the underlying check should not be performed repeatedly (e.g. because it probes command-line tools), consider memoizing its outcome via a field in the builder.

Source

fn make_run(_run: RunConfig<'_>)

Called directly by the bootstrap Step handler when not triggered indirectly by other Steps using Builder::ensure. For example, ./x.py test bootstrap runs this for test::Bootstrap. Similarly, ./x.py test runs it for every step that is listed by the describe macro in Builder::get_step_descriptions.

Source

fn metadata(&self) -> Option<StepMetadata>

Returns metadata of the step, for tests

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Step for Profile

Source§

impl Step for bootstrap::core::build_steps::check::Bootstrap

Source§

impl Step for bootstrap::core::build_steps::check::BumpStage0

Source§

impl Step for bootstrap::core::build_steps::check::CargoMiri

Source§

impl Step for bootstrap::core::build_steps::check::Clippy

Source§

impl Step for bootstrap::core::build_steps::check::Compiletest

Source§

impl Step for bootstrap::core::build_steps::check::CoverageDump

Source§

impl Step for bootstrap::core::build_steps::check::CraneliftCodegenBackend

Source§

impl Step for bootstrap::core::build_steps::check::FeaturesStatusDump

Source§

impl Step for bootstrap::core::build_steps::check::GccCodegenBackend

Source§

impl Step for bootstrap::core::build_steps::check::Linkchecker

Source§

impl Step for bootstrap::core::build_steps::check::Miri

Source§

impl Step for bootstrap::core::build_steps::check::MiroptTestTools

Source§

impl Step for PrepareRustcRmetaSysroot

Source§

impl Step for PrepareStdRmetaSysroot

Source§

impl Step for bootstrap::core::build_steps::check::RunMakeSupport

Source§

impl Step for bootstrap::core::build_steps::check::RustAnalyzer

Source§

impl Step for bootstrap::core::build_steps::check::Rustc

Source§

impl Step for bootstrap::core::build_steps::check::Rustdoc

Source§

impl Step for RustdocGuiTest

Source§

impl Step for bootstrap::core::build_steps::check::Rustfmt

Source§

impl Step for bootstrap::core::build_steps::check::Std

Source§

impl Step for bootstrap::core::build_steps::check::TestFloatParse

Source§

impl Step for bootstrap::core::build_steps::check::Tidy

Source§

impl Step for CleanAll

Source§

impl Step for bootstrap::core::build_steps::clean::Rustc

Source§

impl Step for bootstrap::core::build_steps::clean::Std

Source§

impl Step for bootstrap::core::build_steps::clippy::Bootstrap

Source§

impl Step for bootstrap::core::build_steps::clippy::BuildHelper

Source§

impl Step for bootstrap::core::build_steps::clippy::BuildManifest

Source§

impl Step for CI

Source§

impl Step for bootstrap::core::build_steps::clippy::CargoMiri

Source§

impl Step for bootstrap::core::build_steps::clippy::Clippy

Source§

impl Step for CodegenGcc

Source§

impl Step for bootstrap::core::build_steps::clippy::CollectLicenseMetadata

Source§

impl Step for bootstrap::core::build_steps::clippy::Compiletest

Source§

impl Step for bootstrap::core::build_steps::clippy::CoverageDump

Source§

impl Step for Jsondocck

Source§

impl Step for Jsondoclint

Source§

impl Step for bootstrap::core::build_steps::clippy::LintDocs

Source§

impl Step for bootstrap::core::build_steps::clippy::LlvmBitcodeLinker

Source§

impl Step for bootstrap::core::build_steps::clippy::Miri

Source§

impl Step for bootstrap::core::build_steps::clippy::MiroptTestTools

Source§

impl Step for OptDist

Source§

impl Step for bootstrap::core::build_steps::clippy::RemoteTestClient

Source§

impl Step for bootstrap::core::build_steps::clippy::RemoteTestServer

Source§

impl Step for bootstrap::core::build_steps::clippy::RustAnalyzer

Source§

impl Step for bootstrap::core::build_steps::clippy::RustInstaller

Source§

impl Step for bootstrap::core::build_steps::clippy::Rustc

Source§

impl Step for bootstrap::core::build_steps::clippy::Rustdoc

Source§

impl Step for bootstrap::core::build_steps::clippy::Rustfmt

Source§

impl Step for bootstrap::core::build_steps::clippy::Std

Source§

impl Step for bootstrap::core::build_steps::clippy::TestFloatParse

Source§

impl Step for bootstrap::core::build_steps::clippy::Tidy

Source§

impl Step for Assemble

Source§

impl Step for bootstrap::core::build_steps::compile::CraneliftCodegenBackend

Source§

impl Step for bootstrap::core::build_steps::compile::GccCodegenBackend

Source§

impl Step for bootstrap::core::build_steps::compile::Rustc

Source§

impl Step for StartupObjects

Source§

impl Step for bootstrap::core::build_steps::compile::Std

Source§

impl Step for Sysroot

Source§

impl Step for Analysis

Source§

impl Step for bootstrap::core::build_steps::dist::Bootstrap

Source§

impl Step for bootstrap::core::build_steps::dist::BuildManifest

Source§

impl Step for bootstrap::core::build_steps::dist::Cargo

Source§

impl Step for bootstrap::core::build_steps::dist::Clippy

Source§

impl Step for bootstrap::core::build_steps::dist::CraneliftCodegenBackend

Source§

impl Step for DebuggerScripts

Source§

impl Step for bootstrap::core::build_steps::dist::Docs

Source§

impl Step for Extended

Source§

impl Step for bootstrap::core::build_steps::dist::Gcc

Source§

impl Step for JsonDocs

Source§

impl Step for bootstrap::core::build_steps::dist::LlvmBitcodeLinker

Source§

impl Step for bootstrap::core::build_steps::dist::LlvmTools

Source§

impl Step for Mingw

Source§

impl Step for bootstrap::core::build_steps::dist::Miri

Source§

impl Step for PlainSourceTarball

Source§

impl Step for ReproducibleArtifacts

Source§

impl Step for bootstrap::core::build_steps::dist::RustAnalyzer

Source§

impl Step for RustDev

Source§

impl Step for bootstrap::core::build_steps::dist::Rustc

Source§

impl Step for RustcDev

Source§

impl Step for RustcDocs

Source§

impl Step for bootstrap::core::build_steps::dist::Rustfmt

Source§

impl Step for bootstrap::core::build_steps::dist::Src

Source§

impl Step for bootstrap::core::build_steps::dist::Std

Source§

impl Step for bootstrap::core::build_steps::doc::Bootstrap

Source§

impl Step for bootstrap::core::build_steps::doc::BuildHelper

Source§

impl Step for bootstrap::core::build_steps::doc::Cargo

Source§

impl Step for CargoBook

Source§

impl Step for bootstrap::core::build_steps::doc::Clippy

Source§

impl Step for ClippyBook

Source§

impl Step for bootstrap::core::build_steps::doc::Compiletest

Source§

impl Step for bootstrap::core::build_steps::doc::EditionGuide

Source§

impl Step for bootstrap::core::build_steps::doc::EmbeddedBook

Source§

impl Step for bootstrap::core::build_steps::doc::ErrorIndex

Source§

impl Step for bootstrap::core::build_steps::doc::Miri

Source§

impl Step for bootstrap::core::build_steps::doc::Nomicon

Source§

impl Step for bootstrap::core::build_steps::doc::Reference

Source§

impl Step for Releases

Source§

impl Step for bootstrap::core::build_steps::doc::RunMakeSupport

Source§

impl Step for bootstrap::core::build_steps::doc::RustByExample

Source§

impl Step for bootstrap::core::build_steps::doc::Rustc

Source§

impl Step for bootstrap::core::build_steps::doc::RustcBook

Source§

impl Step for bootstrap::core::build_steps::doc::Rustdoc

Source§

impl Step for bootstrap::core::build_steps::doc::RustdocBook

Source§

impl Step for bootstrap::core::build_steps::doc::Rustfmt

Source§

impl Step for SharedAssets

Source§

impl Step for Standalone

Source§

impl Step for bootstrap::core::build_steps::doc::Std

Source§

impl Step for StyleGuide

Source§

impl Step for bootstrap::core::build_steps::doc::TheBook

Source§

impl Step for bootstrap::core::build_steps::doc::Tidy

Source§

impl Step for bootstrap::core::build_steps::doc::UnstableBook

Source§

impl Step for bootstrap::core::build_steps::doc::UnstableBookGen

Source§

impl Step for bootstrap::core::build_steps::gcc::Gcc

Source§

impl Step for bootstrap::core::build_steps::install::Cargo

Source§

impl Step for bootstrap::core::build_steps::install::Clippy

Source§

impl Step for bootstrap::core::build_steps::install::Docs

Source§

const IS_HOST: bool = false

Source§

type Output = ()

Source§

impl Step for bootstrap::core::build_steps::install::LlvmBitcodeLinker

Source§

impl Step for bootstrap::core::build_steps::install::LlvmTools

Source§

impl Step for bootstrap::core::build_steps::install::Miri

Source§

impl Step for bootstrap::core::build_steps::install::RustAnalyzer

Source§

impl Step for bootstrap::core::build_steps::install::Rustc

Source§

impl Step for RustcCodegenCranelift

Source§

impl Step for bootstrap::core::build_steps::install::Rustfmt

Source§

impl Step for bootstrap::core::build_steps::install::Src

Source§

impl Step for bootstrap::core::build_steps::install::Std

Source§

const IS_HOST: bool = false

Source§

type Output = ()

Source§

impl Step for CrtBeginEnd

Source§

impl Step for Enzyme

Source§

impl Step for Libunwind

Source§

impl Step for Lld

Source§

impl Step for Llvm

Source§

impl Step for Sanitizers

Source§

impl Step for bootstrap::core::build_steps::run::BuildManifest

Source§

impl Step for bootstrap::core::build_steps::run::BumpStage0

Source§

impl Step for bootstrap::core::build_steps::run::CollectLicenseMetadata

Source§

impl Step for bootstrap::core::build_steps::run::CoverageDump

Source§

impl Step for CyclicStep

Source§

impl Step for bootstrap::core::build_steps::run::FeaturesStatusDump

Source§

impl Step for GenerateCompletions

Source§

impl Step for bootstrap::core::build_steps::run::GenerateCopyright

Source§

impl Step for GenerateHelp

Source§

impl Step for bootstrap::core::build_steps::run::GenerateWindowsSys

Source§

impl Step for bootstrap::core::build_steps::run::Miri

Source§

impl Step for bootstrap::core::build_steps::run::ReplaceVersionPlaceholder

Source§

impl Step for bootstrap::core::build_steps::run::Rustfmt

Source§

impl Step for bootstrap::core::build_steps::run::UnicodeTableGenerator

Source§

impl Step for Editor

Source§

impl Step for Hook

Source§

impl Step for MirOptPanicAbortSyntheticTarget

Source§

impl Step for AssemblyLlvm

Source§

const IS_HOST: bool = false

Source§

type Output = ()

Source§

impl Step for BookTest

Source§

impl Step for bootstrap::core::build_steps::test::Bootstrap

Source§

impl Step for BootstrapPy

Source§

impl Step for bootstrap::core::build_steps::test::Cargo

Source§

impl Step for bootstrap::core::build_steps::test::CargoMiri

Source§

impl Step for Cargotest

Source§

impl Step for bootstrap::core::build_steps::test::Clippy

Source§

impl Step for CodegenCranelift

Source§

impl Step for CodegenGCC

Source§

impl Step for CodegenLlvm

Source§

const IS_HOST: bool = false

Source§

type Output = ()

Source§

impl Step for CodegenUnits

Source§

const IS_HOST: bool = false

Source§

type Output = ()

Source§

impl Step for bootstrap::core::build_steps::test::CollectLicenseMetadata

Source§

impl Step for bootstrap::core::build_steps::test::Compiletest

Source§

impl Step for CompiletestTest

Source§

impl Step for Coverage

Source§

const IS_HOST: bool = false

Source§

type Output = ()

Source§

impl Step for CoverageRunRustdoc

Source§

impl Step for Crashes

Source§

const IS_HOST: bool = false

Source§

type Output = ()

Source§

impl Step for Crate

Source§

impl Step for CrateBootstrap

Source§

impl Step for CrateBuildHelper

Source§

impl Step for CrateLibrustc

Source§

impl Step for CrateRunMakeSupport

Source§

impl Step for CrateRustdoc

Source§

impl Step for CrateRustdocJsonTypes

Source§

impl Step for Debuginfo

Source§

const IS_HOST: bool = false

Source§

type Output = ()

Source§

impl Step for Distcheck

Source§

impl Step for bootstrap::core::build_steps::test::EditionGuide

Source§

impl Step for bootstrap::core::build_steps::test::EmbeddedBook

Source§

impl Step for bootstrap::core::build_steps::test::ErrorIndex

Source§

impl Step for HtmlCheck

Source§

impl Step for Incremental

Source§

const IS_HOST: bool = false

Source§

type Output = ()

Source§

impl Step for Linkcheck

Source§

impl Step for bootstrap::core::build_steps::test::LintDocs

Source§

impl Step for MirOpt

Source§

impl Step for bootstrap::core::build_steps::test::Miri

Source§

impl Step for bootstrap::core::build_steps::test::Nomicon

Source§

impl Step for Pretty

Source§

impl Step for bootstrap::core::build_steps::test::Reference

Source§

impl Step for RemoteCopyLibs

Source§

impl Step for RemoteTestClientTests

Source§

impl Step for RunMake

Source§

const IS_HOST: bool = false

Source§

type Output = ()

Source§

impl Step for RunMakeCargo

Source§

const IS_HOST: bool = false

Source§

type Output = ()

Source§

impl Step for bootstrap::core::build_steps::test::RustAnalyzer

Source§

impl Step for bootstrap::core::build_steps::test::RustByExample

Source§

impl Step for bootstrap::core::build_steps::test::RustInstaller

Source§

impl Step for bootstrap::core::build_steps::test::RustcBook

Source§

impl Step for bootstrap::core::build_steps::test::Rustdoc

Source§

impl Step for bootstrap::core::build_steps::test::RustdocBook

Source§

impl Step for RustdocGUI

Source§

impl Step for RustdocJSNotStd

Source§

impl Step for RustdocJSStd

Source§

impl Step for RustdocJson

Source§

impl Step for bootstrap::core::build_steps::test::RustdocTheme

Source§

impl Step for RustdocUi

Source§

impl Step for bootstrap::core::build_steps::test::Rustfmt

Source§

impl Step for bootstrap::core::build_steps::test::TestFloatParse

Source§

impl Step for TestHelpers

Source§

impl Step for bootstrap::core::build_steps::test::TheBook

Source§

impl Step for bootstrap::core::build_steps::test::Tidy

Source§

impl Step for TierCheck

Source§

impl Step for Ui

Source§

const IS_HOST: bool = false

Source§

type Output = ()

Source§

impl Step for UiFullDeps

Source§

impl Step for bootstrap::core::build_steps::test::UnstableBook

Source§

impl Step for bootstrap::core::build_steps::tool::BuildManifest

Source§

impl Step for bootstrap::core::build_steps::tool::BumpStage0

Source§

impl Step for bootstrap::core::build_steps::tool::Cargo

Source§

impl Step for CargoClippy

Source§

impl Step for bootstrap::core::build_steps::tool::CargoMiri

Source§

impl Step for CargoTest

Source§

impl Step for Cargofmt

Source§

impl Step for bootstrap::core::build_steps::tool::Clippy

Source§

impl Step for bootstrap::core::build_steps::tool::CollectLicenseMetadata

Source§

impl Step for bootstrap::core::build_steps::tool::Compiletest

Source§

impl Step for bootstrap::core::build_steps::tool::CoverageDump

Source§

impl Step for bootstrap::core::build_steps::tool::ErrorIndex

Source§

impl Step for bootstrap::core::build_steps::tool::FeaturesStatusDump

Source§

impl Step for bootstrap::core::build_steps::tool::GenerateCopyright

Source§

impl Step for bootstrap::core::build_steps::tool::GenerateWindowsSys

Source§

impl Step for HtmlChecker

Source§

impl Step for JsonDocCk

Source§

impl Step for JsonDocLint

Source§

impl Step for LibcxxVersionTool

Source§

impl Step for bootstrap::core::build_steps::tool::Linkchecker

Source§

impl Step for bootstrap::core::build_steps::tool::LintDocs

Source§

impl Step for LldWrapper

Source§

impl Step for bootstrap::core::build_steps::tool::LlvmBitcodeLinker

Source§

impl Step for bootstrap::core::build_steps::tool::Miri

Source§

impl Step for OptimizedDist

Source§

impl Step for bootstrap::core::build_steps::tool::RemoteTestClient

Source§

impl Step for bootstrap::core::build_steps::tool::RemoteTestServer

Source§

impl Step for bootstrap::core::build_steps::tool::ReplaceVersionPlaceholder

Source§

impl Step for bootstrap::core::build_steps::tool::RunMakeSupport

Source§

impl Step for bootstrap::core::build_steps::tool::RustAnalyzer

Source§

impl Step for RustAnalyzerProcMacroSrv

Source§

impl Step for bootstrap::core::build_steps::tool::RustInstaller

Source§

impl Step for Rustbook

Source§

impl Step for RustcPerf

Source§

impl Step for bootstrap::core::build_steps::tool::Rustdoc

Source§

impl Step for RustdocGUITest

Source§

impl Step for bootstrap::core::build_steps::tool::RustdocTheme

Source§

impl Step for bootstrap::core::build_steps::tool::Rustfmt

Source§

impl Step for bootstrap::core::build_steps::tool::Tidy

Source§

impl Step for ToolBuild

Source§

impl Step for bootstrap::core::build_steps::tool::UnicodeTableGenerator

Source§

impl Step for bootstrap::core::build_steps::tool::UnstableBookGen

Source§

impl Step for WasmComponentLd

Source§

impl Step for ToolStateCheck

Source§

impl Step for Vendor

Source§

impl Step for Libdir

Source§

impl<P: Step> Step for RustbookSrc<P>