[rust-dev] Configuration files library for Rust

Gaetan gaetan at xeberon.net
Sat Jan 4 16:39:45 PST 2014


Thanks for your answer.

I think having reference parsers for majors format is a top feature for the
rust standard lib. Json is pretty standard in web world, and yaml is pretty
simple replacement for XML but lack schema standard.

So if rust provides Json, yaml, ini, toml and why not other config
storage/exchange standards, that will surely attack many developpers, but i
recommend to have a certain homogeneity in the API.

I ve used yaml for quite long time, and indeed indentation can be an issue,
but that the same with Python code.... I am not fan with indentation
meaning nesting, but yaml is much simpler for me to use than Json.
Le 4 janv. 2014 21:59, "Chris Molozian" <chris at cmoz.me> a écrit :

> I second the sysctl syntax it’s very easy to grep through configuration
> files in this format. The “key” prefix contains the context for the
> information which is useful.
>
> i.e. “riak_kv.anti_entropy_leveldb_opts.write_buffer_size”
>
> Riak, a distributed KV dynamo store has recently been moving to the sysctl
> format from the traditional Erlang `app.config` “format".
>
> Cheers.
>
> --
> Chris Molozian
> Software Engineer
>
> On 4 January 2014 at 20:41:59, Christopher Meiklejohn (
> christopher.meiklejohn at gmail.com) wrote:
>
> On Jan 4, 2014, at 3:39 PM, Tony Arcieri <bascule at gmail.com> wrote:
>
>   On Sat, Jan 4, 2014 at 12:35 PM, Daniel Micay <danielmicay at gmail.com>wrote:
>
>> I don't buy that. A text editor should be more than capable enough to
>> stop you from slipping in tabs. If there's a separate untested
>> configuration for production then you have a problem.
>
>
> This isn't just a single offhand incident. It's something I've seen a
> pattern of happening dozens of times over the course of my career. It's
> happened to me personally, and I've seen it happen to others.
>
> Having separate configuration sections for different environments is a
> rather common convention in the Rails world. Is it a bad idea? Offhand I
> can't say: what would you replace it with?
>
>
> Why not something that looks like sysctl [1] syntax?
>
> http://www5.us.freebsd.org/doc/handbook/configtuning-sysctl.html
>
> - Chris
>
> _______________________________________________
> Rust-dev mailing list
> Rust-dev at mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
>
>
> _______________________________________________
> Rust-dev mailing list
> Rust-dev at mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
>
>

-- 
-----
Gaetan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140105/85ca23a4/attachment.html>


More information about the Rust-dev mailing list