Currently this doesn't compile on 1.0.0-beta because rust-peg
uses features that are not available in the beta channel. I am looking into several options, including switching to nom.
In the meantime, just stick to rust nightly and you should be good.
A soon-to-be Rust library to read and parse configuration files.
The idea is to make it very similar to libconfig, with a few extra additions / tweaks.
This is still under heavy development and should be considered unstable. I will publish a first version on crates as soon as the public API is designed and mostly implemented.
- Allow single and multi-line comments in configurations
- Add
#include
support to include other configuration files - Automatically concatenate blank-separated string literals in the configuration. Useful for settings with big strings
- Export a public API to manipulate a configuration in runtime and possibly write it to a file
- Figure out why the parser returns an error on a blanks-only configuration
- Consider splitting the parser into lexer + syntax analyser (much like we would in C with flex + byacc), OR
- Use nom to generate the parser instead of rust-peg. Rust-peg uses features that will not be available in beta.
- Refactor misc types (
Setting
,SettingsList
, etc) into a separate, independent module - Write tests that are expected to fail
- Add missing documentation for undocumented code
- Document
parser::ParseErr
- Write misc documentation with a high level description of the module and its features
- Write integration tests
- Document when, why and how
parse()
returnsErr
-
hex
andhex64
literals support? - Add option to indicate the conf. file encoding
- Enforce the rules for arrays. Arrays are homogeneous and can only hold scalar values