Crate oysterpack_built_mod[][src]

This module provides the op_build_mod!() macro that will generate a public module named build that contains build-time info. The build-time info is extracted during compilation via oysterpack_built.

The generated build module will consist of:

  • constants for each piece of build metadata
Constant Type Description
BUILT_TIME_UTC&strThe built-time in RFC822, UTC
CFG_ENDIAN&strThe endianness, given by cfg!(target_endian).
CFG_ENV&strThe toolchain-environment, given by cfg!(target_env).
CFG_FAMILY&strThe OS-family, given by cfg!(target_family).
CFG_OS&strThe operating system, given by cfg!(target_os).
CFG_POINTER_WIDTHu8The pointer width, given by cfg!(target_pointer_width).
CFG_TARGET_ARCH&strThe target architecture, given by cfg!(target_arch).
CI_PLATFORMOption<&str>The Continuous Integration platform detected during compilation.
DEBUGboolValue of DEBUG for the profile used during compilation.
FEATURES[&str; N]The features that were enabled during compilation.
FEATURES_STR&strThe features as a comma-separated string.
GIT_VERSIONOption<&str>If the crate was compiled from within a git-repository, GIT_VERSION contains HEAD's tag. The short commit id is used if HEAD is not tagged.
HOST&strThe host triple of the rust compiler.
NUM_JOBSu32The parallelism that was specified during compilation.
OPT_LEVEL&strValue of OPT_LEVEL for the profile used during compilation.
PKG_AUTHORS&strA colon-separated list of authors.
PKG_DESCRIPTION&strThe description.
PKG_HOMEPAGE&strThe homepage.
PKG_NAME&strThe name of the package.
PKG_VERSION&strThe full version.
PKG_VERSION_MAJOR&strThe major version.
PKG_VERSION_MINOR&strThe minor version.
PKG_VERSION_PATCH&strThe patch version.
PKG_VERSION_PRE&strThe pre-release version.
PROFILE&strrelease for release builds, debug for other builds.
RUSTC&strThe compiler that cargo resolved to use.
RUSTC_VERSION&strThe output of rustc -V
RUSTDOC&strThe documentation generator that cargo resolved to use.
RUSTDOC_VERSION&strThe output of rustdoc -V
  • fn get() -> Build
    • Build provides a consolidated view of the build-time metadata. This makes it easier to work with the build-time metadata in a typesafe manner.

NOTE: The op_build_mod!() depends on the following dependencies in order to compile:

Macros

op_build_mod

Generate a public module named build which includes build-time info generated via oysterpack_built

Structs

Build

Build provides a consolidated view of the crate's build-time metadata.

BuildBuilder

Used to build new Build instances.

BuildProfile

Build profile used for compilation

Compilation

Compilation info

CompileOptLevel

Value of OPT_LEVEL for the profile used during compilation.

ContinuousIntegrationPlatform

Continuous Integration platform

Endian

endianness

GitVersion

Contains HEAD's tag. The short commit id is used if HEAD is not tagged.

Package

Crate's package info, which is specified in cargo.toml.

PointerWidth

pointer width

RustcVersion

The output of rustc -V

Target

Compile target info

TargetArchitecture

Target architecture

TargetEnv

Target environment - corresponds to the abi part of the target triple

TargetOperatingSystem

The target operating system

TargetTriple

Platforms are identified by their “target triple” which is the string to inform the compiler what kind of output should be produced.