configr_derive 0.8.0

The dead easy way to use config files in your project
Documentation
1
2
3
4
5
6
7
8
9
10
use proc_macro::{self, TokenStream};
use syn::{parse_macro_input, DeriveInput};

#[proc_macro_derive(Configr)]
pub fn configr(input: TokenStream) -> TokenStream {
	let DeriveInput { ident, .. } = parse_macro_input!(input);
	format!(r#"impl Config<Self> for {} {{}}"#, ident)
		.parse()
		.unwrap()
}