TAML is a configuration file format combining some aspects of Markdown, CSV, TOML, YAML and Rust.
As configuration language, TAML's main design goals are to be:
Since it is mainly human-oriented and the same data can be represented in multiple ways, there is in fact no serializer in this library. If you need a data transfer format, pretty much anything else will give you better performance.
That said, I believe that for human-written files, TAML offers a great balance between brevity and simplicity, with more than sufficient performance.
A command line validator and formatter is available in the [taml-cli
] crate.
Serde-intergration can be found in [serde_taml
].
Please use cargo-edit to always add the latest version of this library:
cmd
cargo add taml
TODO: Add a good example file here.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
TAML (always UTF-8 where applicable) can represent much of the Serde data model verbatim and is self-describing, as follows:
bool
is represented as enum with the unit values true
and false
,-
.
.
(meaning at least one leading and trailing digit is necessary, each).
char
matches Rust: '🦀'
unit
and unit_structs are written as empty seq.Yes
No("impossible!")
seq:
taml
((a, b, c), (d, e)) // seqs can be directly nested this way, but then cannot contain structures.
```taml
```
```taml
1 2 3 4 "five"
1.0, 2.0, 3.0, 4.0 1.1, 2.1, 3.1, 4.1 2.1, 2.2, 3.2, 4.2 3.1, 3.2, 3.3, 4.3 4.1, 4.2, 4.3, 4.4 ```
tuple and tuple_struct: as seq, but with length validation
maps, structs and struct_variants are written as sections containing key-value-pairs (one per line), possibly with subsections.
```taml
key: Value
another key
: 1.0
nested\
field: "nested
field"
```
However, you can collect them in a map by adding a field with the name "taml::extra_fields"
. Use #[serde(rename = "taml::extra_fields")]
or equivalent.
TODO: Describe headings.
taml
strictly follows Semantic Versioning 2.0.0 with the following exceptions:
This includes the Rust version requirement specified above.
Earlier Rust versions may be compatible, but this can change with minor or patch releases.
Which versions are affected by features and patches can be determined from the respective headings in CHANGELOG.md.