chksum-build

Build Coverage crates.io docs.rs MSRV unsafe forbidden LICENSE

Tiny library for setting/getting build-time values for your crate.

Features

Setup

Create 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() } ```

Update Cargo.toml

Modify package section

```toml [package]

...

build = "build.rs" ```

Modify build-dependencies section

You 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

Modify dependencies section

As 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

Usage

```rust use chksumbuild::buildinfo;

let buildinfo = buildinfo!(); ```

More usage examples are available in the documentation at docs.rs.

Alternatives

License

MIT