#cargo-toml #compile-time #version #parse #macro

macro build include-cargo-toml

Load properties of Cargo.toml at compile time

1 unstable release

0.1.0 Jan 6, 2022

#237 in #cargo-toml

Download history 6/week @ 2024-01-29 10/week @ 2024-02-19 20/week @ 2024-02-26 3/week @ 2024-03-04 10/week @ 2024-03-11 7/week @ 2024-03-18 11/week @ 2024-03-25 36/week @ 2024-04-01 1/week @ 2024-04-08 18/week @ 2024-04-15 22/week @ 2024-04-22

79 downloads per month

Custom license

9KB
102 lines

Parse all properties of Cargo.toml at compile time

This Rust crate provides a macro to parse Cargo.toml.

This can be useful to implement a --version flag that does not need to be updated manually each time a new version is released.

Using clap might be a little bit of an overload in some cases.


lib.rs:

This crate provides a macro called include_toml! which parses properties of Cargo.toml at compile time.

Dependencies

~2MB
~46K SLoC