Tiny library for setting/getting build-time values for your crate.
build.rs
Create new file build.rs
at the top level of your crate (next to Cargo.toml
).
```rust use chksum_build::{BuildScript, Result};
fn main() -> Result<()> { BuildScript::default().setup() } ```
Cargo.toml
package
section```toml [package]
build = "build.rs" ```
build-dependencies
sectionYou can update Cargo.toml
on your own.
```toml [build-dependencies]
chksum-build = "0.0.2" ```
Or use cargo add
subcommand.
sh
cargo add --build chksum-build
dependencies
sectionAs in the example above you can add entry manually.
```toml [dependencies]
chksum-build = "0.0.2" ```
Or by using subcommand.
sh
cargo add chksum-build
```rust use chksumbuild::buildinfo;
let buildinfo = buildinfo!(); ```
More usage examples are available in the documentation at docs.rs.
MIT