Expand description
§MCAI Build
This crates allows to export Cargo.toml variables at compile time, so that they can be used at execution time.
§Usage
- Add
mcai_buildin thebuild-dependenciesof your package. - Add
serde_jsonin thedependenciesof your package. - Add a
build.rsfile next to yourCargo.tomlthat contains the following code:
ⓘ
fn main() {
mcai_build::build_mcai_info()
}- You can now use the exported variables in your code:
ⓘ
use cargo_toml::Package;
let package: Package = include!(concat!(env!("OUT_DIR"), "/mcai_build.rs"));