Crate build_data_writer[−][src]
build-data-writer
Functions to to write build-data.txt
from your
build.rs
.
Read the file with the
build-data
crate.
Features
- Saves build-time data:
- Timestamp
- Date-time string
- Hostname
- git commit, branch, and dirtiness
- rustc version
forbid(unsafe_code)
- 100% test coverage
Alternatives
build-info
- Mature & popular
- Confusing API
- Uses procedural macros
Example
See build-data
crate docs.
Cargo Geiger Safety Report
Changelog
- v0.1.2 - Support older versions of git when getting branch name.
- v0.1.1 - Initial version
Happy Contributors 🙂
Fixing bugs and adding features is easy and fast. Send us a pull request and we intend to:
- Always respond within 24 hours
- Provide clear & concrete feedback
- Immediately make a new release for your accepted change
Functions
escape_ascii | Converts a byte slice into a string using
|
exec | Executes |
format_iso8601 | Formats the time as an ISO-8601 or RFC-3339 string.
Example: |
get_git_branch | Gets the current branch of the source code directory. |
get_git_commit | Gets the latest git commit of the source code directory. |
get_hostname | Gets the name of the current machine. |
get_rustc_version | Gets the version of the Rust compiler used to build the build script. |
get_seconds_since_epoch | Gets the number of seconds since 1970-01-01T00:00:00Z. |
is_git_dirty | Returns |
no_debug_rebuilds | Tells cargo not to rebuild |
write | Writes |