https://github.com/azkarell/ron_config
https://github.com/azkarell/ron_config
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/azkarell/ron_config
- Owner: Azkarell
- License: mit
- Created: 2022-05-06T20:32:39.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-10T22:24:53.000Z (about 3 years ago)
- Last Synced: 2025-02-02T16:53:25.746Z (5 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 [](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");
```