chksum-build
Tiny library for setting/getting build-time values for your crate.
Features
- Pure Rust,
- No unsafe code,
- As small as it possible,
- Configurable via Cargo features.
Setup
Create build.rs
Create new file build.rs
at the top level of your crate (next to Cargo.toml
).
use ;
Update Cargo.toml
Modify package
section
[]
# ...
= "build.rs"
Modify build-dependencies
section
You can update Cargo.toml
on your own.
[]
# ...
= "0.0.3"
Or use cargo add
subcommand.
Modify dependencies
section
As in the example above you can add entry manually.
[]
# ...
= "0.0.3"
Or by using subcommand.
Usage
use build_info;
let build_info = build_info!;
More usage examples are available in the documentation at docs.rs.
Alternatives
License
MIT