# get_env [![Crates.io](https://img.shields.io/crates/v/get_env.svg?style=flat-square&maxAge=86400)](https://crates.io/crates/get_env) [![Apache-2.0 licensed](https://img.shields.io/crates/l/get_env.svg?style=flat-square&maxAge=2592000)](LICENSE.txt) [![Build Status](https://ci.appveyor.com/api/projects/status/github/alecmocatta/get_env?branch=master&svg=true)](https://ci.appveyor.com/project/alecmocatta/get-env) [![Build Status](https://circleci.com/gh/alecmocatta/get_env/tree/master.svg?style=shield)](https://circleci.com/gh/alecmocatta/get_env) [![Build Status](https://travis-ci.com/alecmocatta/get_env.svg?branch=master)](https://travis-ci.com/alecmocatta/get_env) [Docs](https://docs.rs/get_env/0.1.0) Get argv and envp by hook or by crook. This library goes further than the stdlib to get arguments and environment variables, including reading from `/proc/self/cmdline` and similar. This is helpful for library crates that don't want to require them to be passed down to the library by the user; particularly if called from a non-Rust application where the Rust stdlib hasn't had a chance to capture them from the `int main (int argc, char *argv[])` invocation thus breaking `std::env::args()`. ## Example ```rust extern crate get_env; pub fn my_library_func() { let args = get_env::args(); let vars = get_env::vars(); } ``` ## Note This currently requires Rust nightly for the `used` feature. ## License Licensed under Apache License, Version 2.0, ([LICENSE.txt](LICENSE.txt) or http://www.apache.org/licenses/LICENSE-2.0). Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.