static-toml 1.3.0

Effortlessly embed TOML files into your Rust code as static data with custom data structures.
Documentation
// the example includes an approximate value for pi
#![allow(clippy::approx_constant)]

static_toml::static_toml! {
    /// this is a doc comment
    #[static_toml(
        prefix = Prefix,
        suffix = Suffix,
        root_mod = cfg,
        values_ident = items,
        prefer_slices = false,
        auto_doc = true
    )]
    #[derive(Debug)]
    static EXAMPLE = include_toml!("example.toml");

    // constant values also work
    #[derive(Debug)]
    const MESSAGES = include_toml!("messages.toml");
}

fn main() {
    dbg!(&EXAMPLE);
    dbg!(MESSAGES);
}