[rust-dev] Configuration files library for Rust

Corey Richardson corey at octayn.net
Sat Jan 4 09:38:24 PST 2014

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

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 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
> Rust-dev at mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev

More information about the Rust-dev mailing list