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

macro include-cargo-toml

Load properties of Cargo.toml at compile time

1 unstable release

Uses new Rust 2021

0.1.0 Jan 6, 2022

#844 in Development tools

Download history 3/week @ 2022-01-24 3/week @ 2022-01-31 3/week @ 2022-02-07 4/week @ 2022-02-14 1/week @ 2022-02-21 11/week @ 2022-03-07 4/week @ 2022-03-14 3/week @ 2022-03-21 1/week @ 2022-04-04 27/week @ 2022-04-11 17/week @ 2022-04-18 40/week @ 2022-04-25 32/week @ 2022-05-02 1/week @ 2022-05-09

91 downloads per month

Custom license

8KB
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

~0.6–1.2MB
~28K SLoC