#config-parser #generator #build #parser-generator #parser #config #define

edres

Generate struct and enum definitions from data files

2 unstable releases

0.6.0 Oct 20, 2022
0.5.0 Dec 1, 2020

#1907 in Encoding

42 downloads per month
Used in 2 crates (via glace_macros)

CC0 license

120KB
2.5K SLoC

edres

If serde turns your structs into markup files,

then edres turns your markup files into structs.

CI Docs.rs Crates.io codecov

Usage

If you want to use this crate in a build.rs file (as opposed to inside a proc macro), it needs to be added to [build-dependencies].

[build-dependencies.edres]
version = "0.6"
features = ["toml"]

By default, edres is markup-language-agnostic, so include the relevant feature for whatever language your config file is written in. Choices are:

  1. json
  2. toml
  3. yaml

See the docs for examples of how to use this crate.

Dependencies

~5–7.5MB
~131K SLoC