Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/azkarell/ron_config
https://github.com/azkarell/ron_config
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/azkarell/ron_config
- Owner: Azkarell
- License: mit
- Created: 2022-05-06T20:32:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-10T22:24:53.000Z (over 2 years ago)
- Last Synced: 2024-10-19T08:40:01.465Z (2 months ago)
- Language: Rust
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A simple tool to load configuration from file [![Rust](https://github.com/Azkarell/ron_config/actions/workflows/rust.yml/badge.svg)](https://github.com/Azkarell/ron_config/actions/workflows/rust.yml)
## Issues
It is currently not possible to use enums. This is caused by how ron handles enums in its Value struct. Either i write something on my own (which is currently not planned because workaround with strings is possible but cumbersome) or I hope ron improves enum handling intern. As far as i can tell they are working on an improved version. i will wait and see if this is usable.## Supported file formats
Currently only ron is supported (as the name suggests :))
## Simple usage
```rust
use ron_config::ConfigBuilder;
let config = ConfigBuilder::new()
.str("(foo: \"bar\")")
.build();
assert_eq!(config.try_get::("foo".into()).unwrap(), "bar");
```