envcfg 0.0.1

A Rust crate for environment configuration management.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate proc_macro;
use proc_macro::TokenStream;
use quote::quote;
use syn::{DeriveInput, parse_macro_input};

/// ⚠️WARNING: WIP
#[proc_macro_derive(EnvCfg, attributes(env_cfg))]
pub fn derive(input: TokenStream) -> TokenStream {
    let ast = parse_macro_input!(input as DeriveInput);

    dbg!(ast);

    let expanded = quote! {
        // Implementation comes here
    };

    TokenStream::from(expanded)
}