mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-25 17:30:41 +00:00
30 lines
14 KiB
HTML
30 lines
14 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="shadow-rs mod"><title>common_version::build - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_version" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (fa3155a64 2025-09-30)" data-channel="nightly" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module build</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_version/index.html">common_<wbr>version</a><span class="version">1.0.0-rc.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module build</a></h2><h3><a href="#constants">Module Items</a></h3><ul class="block"><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate common_<wbr>version</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_version</a></div><h1>Module <span>build</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/common_version/lib.rs.html#19">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>shadow-rs mod</p>
|
||
</div></details><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><dl class="item-table"><dt><a class="constant" href="constant.BRANCH.html" title="constant common_version::build::BRANCH">BRANCH</a></dt><dd>The name of the Git branch that this project was built from.
|
||
This constant will be empty if the branch cannot be determined.</dd><dt><a class="constant" href="constant.BUILD_OS.html" title="constant common_version::build::BUILD_OS">BUILD_<wbr>OS</a></dt><dd>Operating system and architecture on which the project was build.
|
||
The format of this variable is always <code>os-arch</code>,
|
||
where <code>os</code> is the operating system name as returned by <a href="https://doc.rust-lang.org/nightly/std/env/consts/constant.OS.html" title="constant std::env::consts::OS"><code>std::env::consts::OS</code></a>,
|
||
and <code>arch</code> is the computer architecture as returned by <a href="https://doc.rust-lang.org/nightly/std/env/consts/constant.ARCH.html" title="constant std::env::consts::ARCH"><code>std::env::consts::ARCH</code></a>.</dd><dt><a class="constant" href="constant.BUILD_RUST_CHANNEL.html" title="constant common_version::build::BUILD_RUST_CHANNEL">BUILD_<wbr>RUST_<wbr>CHANNEL</a></dt><dd>The debug configuration with which the project was built.
|
||
Note that this is not the Rust channel, but either <code>debug</code> or <code>release</code>, depending on whether debug assertions were enabled in the build or not.</dd><dt><a class="constant" href="constant.BUILD_TARGET.html" title="constant common_version::build::BUILD_TARGET">BUILD_<wbr>TARGET</a></dt><dd>The <a href="https://doc.rust-lang.org/rustc/targets/index.html">target</a> for this build.
|
||
This is possibly distinct from the host target during build, in which case this project build was created via cross-compilation.</dd><dt><a class="constant" href="constant.BUILD_TARGET_ARCH.html" title="constant common_version::build::BUILD_TARGET_ARCH">BUILD_<wbr>TARGET_<wbr>ARCH</a></dt><dd>The architecture of the target for this build. This is the “architecture” part of the <a href="constant.BUILD_TARGET.html" title="constant common_version::build::BUILD_TARGET"><code>BUILD_TARGET</code></a> constant.</dd><dt><a class="constant" href="constant.BUILD_TIME.html" title="constant common_version::build::BUILD_TIME">BUILD_<wbr>TIME</a></dt><dd>The project build time, formatted in modified ISO 8601 format (<code>YYYY-MM-DD HH-MM ±hh-mm</code> where hh-mm is the offset from UTC).</dd><dt><a class="constant" href="constant.BUILD_TIME_2822.html" title="constant common_version::build::BUILD_TIME_2822">BUILD_<wbr>TIME_<wbr>2822</a></dt><dd>The project build time, formatted according to <a href="https://datatracker.ietf.org/doc/html/rfc2822#section-3.3">RFC 2822</a> (e.g. HTTP Headers).</dd><dt><a class="constant" href="constant.BUILD_TIME_3339.html" title="constant common_version::build::BUILD_TIME_3339">BUILD_<wbr>TIME_<wbr>3339</a></dt><dd>The project build time, formatted according to <a href="https://datatracker.ietf.org/doc/html/rfc3339#section-5.6">RFC 3339 and ISO 8601</a>.</dd><dt><a class="constant" href="constant.CARGO_MANIFEST_DIR.html" title="constant common_version::build::CARGO_MANIFEST_DIR">CARGO_<wbr>MANIFEST_<wbr>DIR</a></dt><dd>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.</dd><dt><a class="constant" href="constant.CARGO_VERSION.html" title="constant common_version::build::CARGO_VERSION">CARGO_<wbr>VERSION</a></dt><dd>The cargo version which which the project was built, as output by <code>cargo --version</code>.</dd><dt><a class="constant" href="constant.CLAP_LONG_VERSION.html" title="constant common_version::build::CLAP_LONG_VERSION">CLAP_<wbr>LONG_<wbr>VERSION</a></dt><dd>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.</dd><dt><a class="constant" href="constant.COMMITS_SINCE_TAG.html" title="constant common_version::build::COMMITS_SINCE_TAG">COMMITS_<wbr>SINCE_<wbr>TAG</a></dt><dd>The number of commits since the last Git tag on the branch that this project was built from.
|
||
This value indicates how many commits have been made after the last tag and before the current commit.</dd><dt><a class="constant" href="constant.COMMIT_AUTHOR.html" title="constant common_version::build::COMMIT_AUTHOR">COMMIT_<wbr>AUTHOR</a></dt><dd>The author of the Git commit that this project was built from.</dd><dt><a class="constant" href="constant.COMMIT_DATE.html" title="constant common_version::build::COMMIT_DATE">COMMIT_<wbr>DATE</a></dt><dd>The time of the Git commit that this project was built from.
|
||
The time is formatted in modified ISO 8601 format (<code>YYYY-MM-DD HH-MM ±hh-mm</code> where hh-mm is the offset from UTC).</dd><dt><a class="constant" href="constant.COMMIT_DATE_2822.html" title="constant common_version::build::COMMIT_DATE_2822">COMMIT_<wbr>DATE_<wbr>2822</a></dt><dd>The name of the Git branch that this project was built from.
|
||
The time is formatted according to <a href="https://datatracker.ietf.org/doc/html/rfc2822#section-3.3">RFC 2822</a> (e.g. HTTP Headers).</dd><dt><a class="constant" href="constant.COMMIT_DATE_3339.html" title="constant common_version::build::COMMIT_DATE_3339">COMMIT_<wbr>DATE_<wbr>3339</a></dt><dd>The name of the Git branch that this project was built from.
|
||
The time is formatted according to <a href="https://datatracker.ietf.org/doc/html/rfc3339#section-5.6">RFC 3339 and ISO 8601</a>.</dd><dt><a class="constant" href="constant.COMMIT_EMAIL.html" title="constant common_version::build::COMMIT_EMAIL">COMMIT_<wbr>EMAIL</a></dt><dd>The e-mail address of the author of the Git commit that this project was built from.</dd><dt><a class="constant" href="constant.COMMIT_HASH.html" title="constant common_version::build::COMMIT_HASH">COMMIT_<wbr>HASH</a></dt><dd>The full commit hash of the Git commit that this project was built from.
|
||
An abbreviated, but not necessarily unique, version of this is <a href="constant.SHORT_COMMIT.html" title="constant common_version::build::SHORT_COMMIT"><code>SHORT_COMMIT</code></a>.</dd><dt><a class="constant" href="constant.GIT_CLEAN.html" title="constant common_version::build::GIT_CLEAN">GIT_<wbr>CLEAN</a></dt><dd>Whether the Git working tree was clean at the time of project build (<code>true</code>), or not (<code>false</code>).</dd><dt><a class="constant" href="constant.GIT_STATUS_FILE.html" title="constant common_version::build::GIT_STATUS_FILE">GIT_<wbr>STATUS_<wbr>FILE</a></dt><dd>The Git working tree status as a list of files with their status, similar to <code>git status</code>.
|
||
Each line of the list is preceded with <code> *</code>, followed by the file name.
|
||
Files marked <code>(dirty)</code> have unstaged changes.
|
||
Files marked <code>(staged)</code> have staged changes.</dd><dt><a class="constant" href="constant.LAST_TAG.html" title="constant common_version::build::LAST_TAG">LAST_<wbr>TAG</a></dt><dd>The name of the last Git tag on the branch that this project was built from.
|
||
As opposed to <a href="constant.TAG.html" title="constant common_version::build::TAG"><code>TAG</code></a>, this does not require the current commit to be tagged, just one of its parents.</dd><dt><a class="constant" href="constant.PKG_DESCRIPTION.html" title="constant common_version::build::PKG_DESCRIPTION">PKG_<wbr>DESCRIPTION</a></dt><dd>The project’s description, as determined by the Cargo.toml manifest.</dd><dt><a class="constant" href="constant.PKG_VERSION.html" title="constant common_version::build::PKG_VERSION">PKG_<wbr>VERSION</a></dt><dd>The project’s full version string, as determined by the Cargo.toml manifest.</dd><dt><a class="constant" href="constant.PKG_VERSION_MAJOR.html" title="constant common_version::build::PKG_VERSION_MAJOR">PKG_<wbr>VERSION_<wbr>MAJOR</a></dt><dd>The project’s semver major version, as determined by the Cargo.toml manifest.</dd><dt><a class="constant" href="constant.PKG_VERSION_MINOR.html" title="constant common_version::build::PKG_VERSION_MINOR">PKG_<wbr>VERSION_<wbr>MINOR</a></dt><dd>The project’s semver minor version, as determined by the Cargo.toml manifest.</dd><dt><a class="constant" href="constant.PKG_VERSION_PATCH.html" title="constant common_version::build::PKG_VERSION_PATCH">PKG_<wbr>VERSION_<wbr>PATCH</a></dt><dd>The project’s semver patch version, as determined by the Cargo.toml manifest.</dd><dt><a class="constant" href="constant.PKG_VERSION_PRE.html" title="constant common_version::build::PKG_VERSION_PRE">PKG_<wbr>VERSION_<wbr>PRE</a></dt><dd>The project’s semver pre-release version, as determined by the Cargo.toml manifest.</dd><dt><a class="constant" href="constant.PROJECT_NAME.html" title="constant common_version::build::PROJECT_NAME">PROJECT_<wbr>NAME</a></dt><dd>The project name, as determined by the Cargo.toml manifest.</dd><dt><a class="constant" href="constant.RUST_CHANNEL.html" title="constant common_version::build::RUST_CHANNEL">RUST_<wbr>CHANNEL</a></dt><dd>The <a href="https://rust-lang.github.io/rustup/concepts/toolchains.html">Rustup toolchain</a> 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 <a href="https://rust-lang.github.io/rustup/concepts/channels.html">channel</a> information (stable, beta or nightly).</dd><dt><a class="constant" href="constant.RUST_VERSION.html" title="constant common_version::build::RUST_VERSION">RUST_<wbr>VERSION</a></dt><dd>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 <code>rustc --version</code>.</dd><dt><a class="constant" href="constant.SHORT_COMMIT.html" title="constant common_version::build::SHORT_COMMIT">SHORT_<wbr>COMMIT</a></dt><dd>The short hash of the Git commit that this project was built from.
|
||
Note that this will always truncate <a href="constant.COMMIT_HASH.html" title="constant common_version::build::COMMIT_HASH"><code>COMMIT_HASH</code></a> to 8 characters if necessary.
|
||
Depending on the amount of commits in your project, this may not yield a unique Git identifier
|
||
(<a href="https://git-scm.com/docs/git-describe#_examples">see here for more details on hash abbreviation</a>).</dd><dt><a class="constant" href="constant.TAG.html" title="constant common_version::build::TAG">TAG</a></dt><dd>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.</dd><dt><a class="constant" href="constant.VERSION.html" title="constant common_version::build::VERSION">VERSION</a></dt><dd>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.</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.print_build_in.html" title="fn common_version::build::print_build_in">print_<wbr>build_<wbr>in</a></dt><dd>Prints all built-in <code>shadow-rs</code> build constants to standard output.</dd></dl></section></div></main></body></html> |