2023-07-06 10:25:11 +00:00
|
|
|
# teeconfig
|
|
|
|
|
2023-07-06 10:25:53 +00:00
|
|
|
[![Version](https://img.shields.io/crates/v/teeconfig)](https://crates.io/crates/teeconfig)
|
|
|
|
[![Downloads](https://img.shields.io/crates/d/teeconfig)](https://crates.io/crates/teeconfig)
|
|
|
|
[![License](https://img.shields.io/crates/l/teeconfig)](https://crates.io/crates/teeconfig)
|
|
|
|
![Rust](https://github.com/edg-l/teeconfig/workflows/Rust/badge.svg)
|
|
|
|
[![Docs](https://docs.rs/teeconfig/badge.svg)](https://docs.rs/teeconfig)
|
|
|
|
|
2023-07-06 10:25:11 +00:00
|
|
|
A ddnet / teeworlds configuration parser.
|
|
|
|
|
|
|
|
It recognizes the available options by parsing source files with `MACRO_CONFIG_` lines such as `src/engine/shared/config_variables.h`.
|
|
|
|
|
|
|
|
|
2023-07-06 10:33:00 +00:00
|
|
|
```rust
|
|
|
|
use teeconfig::parse_config_variables;
|
|
|
|
|
2023-07-06 10:25:11 +00:00
|
|
|
let header_source = include_str!("../config_variables.h");
|
|
|
|
let vars = parse_config_variables(header_source).unwrap();
|
|
|
|
assert!(!vars.is_empty())
|
|
|
|
```
|