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

macro build include-cargo-toml2

Load properties of Cargo.toml at compile time

1 unstable release

0.3.1 Oct 16, 2024
0.3.0 Oct 15, 2024
0.2.0 Oct 15, 2024
0.1.0 Oct 15, 2024

#620 in Build Utils

Download history 300/week @ 2024-10-12 35/week @ 2024-10-19 1/week @ 2024-10-26 2/week @ 2024-11-02

338 downloads per month

Custom license

10KB
150 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.

This crate is a fork of include-cargo-toml https://github.com/cpu-runtime/include-cargo-toml.


lib.rs:

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

Dependencies

~2MB
~45K SLoC