[rust-dev] Configuration files library for Rust
gaetan at xeberon.net
Sat Jan 4 10:17:54 PST 2014
I m also interessed in writing a YAML loader/dumper for rust but i m still
learning the language...
Le 4 janv. 2014 19:00, "Flaper87" <flaper87 at gmail.com> a écrit :
> 2014/1/4 Corey Richardson <corey at octayn.net>
>> 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, which I think is
>> an excellent library. In multibuilder, 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).
>>  http://www.hyperrealm.com/libconfig/
>>  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.
>> On Sat, Jan 4, 2014 at 9:01 AM, Flaper87 <flaper87 at gmail.com> wrote:
>> > Hi Guys,
>> > I was looking around and I couldn't find a config file parser library
>> > 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 -
>> > 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 files
>> > but with some changes to support list options and other types. One of
>> > 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
>> > that I'm not aware of, what the preferences are, etc.
>> > Cheers,
>> > FF
>> >  https://github.com/openstack/oslo.config
>> >  http://en.wikipedia.org/wiki/INI_file
>> > --
>> > Flavio (@flaper87) Percoco
>> > http://www.flaper87.com
>> > http://github.com/FlaPer87
>> > _______________________________________________
>> > Rust-dev mailing list
>> > Rust-dev at mozilla.org
>> > https://mail.mozilla.org/listinfo/rust-dev
> Flavio (@flaper87) Percoco
> Rust-dev mailing list
> Rust-dev at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rust-dev