Crates.io | chksum-build |
lib.rs | chksum-build |
version | 0.0.3 |
source | src |
created_at | 2022-11-27 19:41:41.50834 |
updated_at | 2023-01-02 19:20:07.634364 |
description | Tiny library for setting/getting build-time values for your crate. |
homepage | |
repository | https://github.com/ferric-bytes/chksum-build |
max_upload_size | |
id | 723895 |
size | 57,490 |
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
).
use chksum_build::{BuildScript, Result};
fn main() -> Result<()> {
BuildScript::default().setup()
}
Cargo.toml
package
section[package]
# ...
build = "build.rs"
build-dependencies
sectionYou can update Cargo.toml
on your own.
[build-dependencies]
# ...
chksum-build = "0.0.3"
Or use cargo add
subcommand.
cargo add --build chksum-build
dependencies
sectionAs in the example above you can add entry manually.
[dependencies]
# ...
chksum-build = "0.0.3"
Or by using subcommand.
cargo add chksum-build
use chksum_build::build_info;
let build_info = build_info!();
More usage examples are available in the documentation at docs.rs.
MIT