rsinfo 0.1.3

Add `vergen` to your [build-dependencies], then get all build info in single struct.
Documentation
/* Compiler Path & Flags */
pub const CARGO: &'static str = get_env!("CARGO");
pub const RUSTC: &'static str = get_env!("RUSTC");
pub const RUSTFLAGS: &'static str = get_env!("RUSTFLAGS");
pub const CC: &'static str = get_env!("CC");
pub const CFLAGS: &'static str = get_env!("CFLAGS");

/* General POSIX/UNIX environment */
pub const PATH: &'static str = get_env!("PATH");
pub const PWD: &'static str = get_env!("PWD");
pub const HOME: &'static str = get_env!("HOME");
pub const SHELL: &'static str = get_env!("SHELL");
pub const USER: &'static str = get_env!("USER");
pub const PREFIX: &'static str = get_env!("PREFIX");
pub const TMPDIR: &'static str = get_env!("TMPDIR");
pub const LD_PRELOAD: &'static str = get_env!("LD_PRELOAD");
pub const LD_LIBRARY_PATH: &'static str = get_env!("LD_LIBRARY_PATH");
pub const TERM: &'static str = get_env!("TERM");
pub const COLORTERM: &'static str = get_env!("COLORTERM");

// Android.
pub const ANDROID_ROOT: &'static str = get_env!("ANDROID_ROOT");
pub const DEX2OATBOOTCLASSPATH: &'static str = get_env!("DEX2OATBOOTCLASSPATH");

// Mac OS X (darwin)
pub const DYLD_FALLBACK_LIBRARY_PATH: &'static str = get_env!("DYLD_FALLBACK_LIBRARY_PATH");

// AIX
pub const LIBPATH: &'static str = get_env!("LIBPATH");

// [ANCHOR START] CONST-TO-STRUCT.PY //

/*
 * the following source code is automatic generated by const-to-struct.py
 * DO NOT EDIT.
*/

#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub struct env_info {
    pub cargo: &'static str,
    pub rustc: &'static str,
    pub rustflags: &'static str,
    pub cc: &'static str,
    pub cflags: &'static str,
    pub path: &'static str,
    pub pwd: &'static str,
    pub home: &'static str,
    pub shell: &'static str,
    pub user: &'static str,
    pub prefix: &'static str,
    pub tmpdir: &'static str,
    pub ld_preload: &'static str,
    pub ld_library_path: &'static str,
    pub term: &'static str,
    pub colorterm: &'static str,
    pub android_root: &'static str,
    pub dex2oatbootclasspath: &'static str,
    pub dyld_fallback_library_path: &'static str,
    pub libpath: &'static str,
}
pub const ALL_INFO: env_info = all_info();
pub const fn all_info() -> env_info {
    env_info {
        cargo: CARGO,
        rustc: RUSTC,
        rustflags: RUSTFLAGS,
        cc: CC,
        cflags: CFLAGS,
        path: PATH,
        pwd: PWD,
        home: HOME,
        shell: SHELL,
        user: USER,
        prefix: PREFIX,
        tmpdir: TMPDIR,
        ld_preload: LD_PRELOAD,
        ld_library_path: LD_LIBRARY_PATH,
        term: TERM,
        colorterm: COLORTERM,
        android_root: ANDROID_ROOT,
        dex2oatbootclasspath: DEX2OATBOOTCLASSPATH,
        dyld_fallback_library_path: DYLD_FALLBACK_LIBRARY_PATH,
        libpath: LIBPATH,
    }
}
#[cfg(feature = "json")]
impl env_info {
    pub fn to_json(&self) -> serde_json::Value {
        serde_json::json!({
            "cargo": self.cargo,
            "rustc": self.rustc,
            "rustflags": self.rustflags,
            "cc": self.cc,
            "cflags": self.cflags,
            "path": self.path,
            "pwd": self.pwd,
            "home": self.home,
            "shell": self.shell,
            "user": self.user,
            "prefix": self.prefix,
            "tmpdir": self.tmpdir,
            "ld_preload": self.ld_preload,
            "ld_library_path": self.ld_library_path,
            "term": self.term,
            "colorterm": self.colorterm,
            "android_root": self.android_root,
            "dex2oatbootclasspath": self.dex2oatbootclasspath,
            "dyld_fallback_library_path": self.dyld_fallback_library_path,
            "libpath": self.libpath,
        })
    }
}
// [ANCHOR ENDED] CONST-TO-STRUCT.PY //