2014/1/4 Corey Richardson <[email protected]> > oslo.config looks decent. On some projects I've worked on, we started > out using INI files but found them severely lacking once we wanted to > extend the options. We ended up using libconfig[0], which I think is > an excellent library. In multibuilder[1], we use extra::serialize to > load a config directly into the struct we'll be using. It's super > convenient, but a bit unfortunate in that it's impossible to make a > field truly optional (Option<T> requires the field to be null, iirc). > > [0] http://www.hyperrealm.com/libconfig/ > [1] https://github.com/huonw/multibuilder/blob/master/main.rs#L68
I'm also considering to have support for several parsers. It should be pretty simple / straightforward to do so. We could have a default parser based on INI files and then allow people to specify a different parser in case INI files are not what they want to use. I'll dive into libconfig and pick things from there as well. Also, I agree INI files could be a bit limited, which is why we ended up having our own INI parser in oslo.config. Thoughts? FF > > > On Sat, Jan 4, 2014 at 9:01 AM, Flaper87 <[email protected]> wrote: > > Hi Guys, > > > > I was looking around and I couldn't find a config file parser library for > > Rust. Getopt support seems to be pretty complete and stable, which would > > make the development of such library easier. > > > > Since I've some experience on this area, I thought about doing some work > on > > it for Rust. > > > > My current plan is to do something along the lines of oslo.config[0] - > which > > I've been contributing to - and take advantage of the existing getopt > > module, just as we do in oslo.config. > > > > The config file format parsed by oslo.config follows the INI[1] files > format > > but with some changes to support list options and other types. One of the > > advantages of this library is that the config options registration is > > explicit and simple. > > > > However, before starting to work on this, I'd like to know what folks on > > this list think about the library, if there's been some work on this area > > that I'm not aware of, what the preferences are, etc. > > > > Cheers, > > FF > > > > [0] https://github.com/openstack/oslo.config > > [1] http://en.wikipedia.org/wiki/INI_file > > > > -- > > Flavio (@flaper87) Percoco > > http://www.flaper87.com > > http://github.com/FlaPer87 > > > > _______________________________________________ > > Rust-dev mailing list > > [email protected] > > https://mail.mozilla.org/listinfo/rust-dev > > > -- Flavio (@flaper87) Percoco http://www.flaper87.com http://github.com/FlaPer87
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
