Dynamic Config Markup Language, Rust implementation
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
.rustfmt.toml
CODE_OF_CONDUCT.md
Cargo.lock
Cargo.toml
README.md
UNLICENSE

README.md

dcml: Dynamic Config Markup Language unlicense

A new semi-programmable configuration language.

Inspired by Dhall (but not statically typed), hjson, libucl and others.

Implemented in Rust with Serde deserialization support. Parsing powered by combine. Uses immutable data structures.

{
  simple "syntax" // with Rust/C style line comments
  "key value pairs" "without any colons and commas/semicolons, like clojure"

  arraysToo [ 1 2 3 4 "hello world" { nested "dictionary in array" } ]

  numbersCanBeCalculated 1.2 * 3.4

  allNumbersAre "arbitrary precision rationals"
  // it's a config format not a mega high performance calculator

  binaryAndHexLiterals 0xff + 0b0011

  underscoresInNumbers 0xf__ff___f_ * 1_000_000

  interpolatedStrings `with ES6 like syntax ${123 * 1_000 + 456}`

  escapesInStrings "like json\u003a\u0029\nbut you don't *have* to escape control characters
which means that strings are multiline
and the unicode escape is not limited to 4 digits \u1F4AF"


  andNowTheBonusFeature #tagsForValues "this string is wrapped with that tag"
  tagsCanBeUsed "for rust enum variants, for example"
}

TODO:

  • enum deserialization in serde
  • comments
  • top level object without the curly braces
  • number multiplier suffixes
  • variables
  • include functionality (with user pluggable resolver!)
  • built-in functions like map
  • lambdas

Contributing

By participating in this project you agree to follow the Contributor Code of Conduct.

The list of contributors is available on GitHub.

License

This is free and unencumbered software released into the public domain.
For more information, please refer to the UNLICENSE file or unlicense.org.

Note that third party dependencies are licensed under different terms.