appinfo 0.1.0

Macro to derive appinfo at compile time using cargo compile-time env vars and `clap-rs`.
Documentation

appinfo-rs

Macro to derive appinfo at compile time using cargo compile-time env vars and clap-rs.

Usage

#[appinfo:main]
fn main(){
    // my wonderful application
    println!("hello world")!
    cli.do_stuff()
    server.listen(3000)
}

then in a terminal do:

app -h

or

app -v

All the info are retrieved at compile time.

Dependency:

Install clap:

cargo add clap

Future Enhacements

  • Validation logic that the macro is applied only in main.
  • Override of vars through the macro args.