get_env

Crates.ioget_env
lib.rsget_env
version0.1.0
sourcesrc
created_at2018-07-24 16:26:07.121874
updated_at2018-07-24 16:26:07.121874
descriptionGet 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.
homepagehttps://github.com/alecmocatta/get_env
repositoryhttps://github.com/alecmocatta/get_env
max_upload_size
id75783
size34,216
Alec Mocatta (alecmocatta)

documentation

https://docs.rs/get_env/0.1.0

README

get_env

Crates.io Apache-2.0 licensed Build Status Build Status Build Status

Docs

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

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 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.

Commit count: 0

cargo fmt