toml-scaffold
Generate commented TOML configuration scaffold files from Rust structs and values.
Features
- Preserve doc comments as TOML comments
- Preserve field order in generated TOML
- Support for common types: primitives, Option, HashMap, Vec, nested structs and
serde_json::Value
Installation
Add the following dependencies to your Cargo.toml:
[]
= { = "1", = ["derive"] }
= "1"
= "0.1"
Usage
use ;
use JsonSchema;
use TomlScaffold;
Output:
# Server host address
= "localhost"
# Server port
= 8080