diff --git a/Cargo.toml b/Cargo.toml index 16199dc..5619f65 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,13 @@ name = "teeconfig" version = "0.1.0-alpha.0" edition = "2021" +authors = ["Edgar "] +description = "A teeworlds/ddnet config parser." +repository = "https://github.com/edg-l/teeconfig/" +license = "AGPL-3.0" +keywords = ["ddnet", "teeworlds", "config", "parser"] +documentation = "https://docs.rs/teeconfig" +readme = "README.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/README.md b/README.md new file mode 100644 index 0000000..41ca06b --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# teeconfig + +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`. + + +```rs +let header_source = include_str!("../config_variables.h"); +let vars = parse_config_variables(header_source).unwrap(); +assert!(!vars.is_empty()) +``` diff --git a/src/lib.rs b/src/lib.rs index 850e3c3..568d97b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,5 @@ +#![doc = include_str!("../README.md")] + use bitflags::bitflags; use lalrpop_util::{lalrpop_mod, ParseError}; use tokens_cpp::{LexicalError, Token};