Module starship::shadow

source ·
Expand description

shadow-rs mod

Constants

  • The name of the Git branch that this project was built from.
  • Operating system and architecture on which the project was build. The format of this variable is always os-arch, where os is the operating system name as returned by std::env::consts::OS, and arch is the computer architecture as returned by std::env::consts::ARCH.
  • The debug configuration with which the project was built. Note that this is not the Rust channel, but either debug or release, depending on whether debug assertions were enabled in the build or not.
  • The target for this build. This is possibly distinct from the host target during build, in which case this project build was created via cross-compilation.
  • The architecture of the target for this build. This is the “architecture” part of the BUILD_TARGET constant.
  • The project build time, formatted in modified ISO 8601 format (YYYY-MM-DD HH-MM ±hh-mm where hh-mm is the offset from UTC).
  • The project build time, formatted according to RFC 2822 (e.g. HTTP Headers).
  • The project build time, formatted according to RFC 3339 and ISO 8601.
  • The directory of the Cargo.toml manifest file of the project during build. Note that this variable will contain a full local file system path, and will therefore contain sensitive information and not be reproducible.
  • The dependency tree of the project, as output by cargo tree. Note that this variable may contain local file system paths for path dependencies, and may therefore contain sensitive information and not be reproducible.
  • The cargo version which which the project was built, as output by cargo --version.
  • A long version string describing the project. The version string contains the package version, branch, commit hash, build time, and build environment on separate lines. This constant is intended to be used by clap or other CLI tools as a long version string.
  • CLAP_VERSIONDeprecated
  • The author of the Git commit that this project was built from.
  • The time of the Git commit that this project was built from. The time is formatted in modified ISO 8601 format (YYYY-MM-DD HH-MM ±hh-mm where hh-mm is the offset from UTC).
  • The name of the Git branch that this project was built from. The time is formatted according to RFC 2822 (e.g. HTTP Headers).
  • The name of the Git branch that this project was built from. The time is formatted according to RFC 3339 and ISO 8601.
  • The e-mail address of the author of the Git commit that this project was built from.
  • The full commit hash of the Git commit that this project was built from. An abbreviated, but not necessarily unique, version of this is SHORT_COMMIT.
  • Whether the Git working tree was clean at the time of project build (true), or not (false).
  • The Git working tree status as a list of files with their status, similar to git status. Each line of the list is preceded with *, followed by the file name. Files marked (dirty) have unstaged changes. Files marked (staged) have staged changes.
  • The name of the last Git tag on the branch that this project was built from. As opposed to TAG, this does not require the current commit to be tagged, just one of its parents.
  • The project’s description, as determined by the Cargo.toml manifest.
  • The project’s full version string, as determined by the Cargo.toml manifest.
  • The project’s semver major version, as determined by the Cargo.toml manifest.
  • The project’s semver minor version, as determined by the Cargo.toml manifest.
  • The project’s semver patch version, as determined by the Cargo.toml manifest.
  • The project’s semver pre-release version, as determined by the Cargo.toml manifest.
  • The project name, as determined by the Cargo.toml manifest.
  • The Rustup toolchain with which the project was built. Note that as per Rustup toolchain format, this variable may or may not contain host and date information, but it will always contain channel information (stable, beta or nightly).
  • Rust version with which the project was built. The version always uses the canonical Rust version format, and is therefore identical to the output of the build toolchain’s rustc --version.
  • The short hash of the Git commit that this project was built from. Note that this will always truncate COMMIT_HASH to 8 characters if necessary. Depending on the amount of commits in your project, this may not yield a unique Git identifier (see here for more details on hash abbreviation).
  • The name of the Git tag that this project was built from. Note that this will be empty if there is no tag for the HEAD at the time of build.
  • A long version string describing the project. The version string contains the package version, branch, commit hash, build time, and build environment on separate lines. This constant is suitable for printing to the user.

Functions