| 1 | # rust-uname |
| 2 | |
| 3 | Name and information about current kernel |
| 4 | |
| 5 | ## Dashboard |
| 6 | |
| 7 | | Linux CI | Test Coverage | Crate | Documentation | |
| 8 | |:--------:|:-------------:|:-----:|:-------------:| |
| 9 | | [](https://travis-ci.org/icorderi/rust-uname) | [](https://coveralls.io/r/icorderi/rust-uname?branch=master) | [](https://crates.io/crates/uname) | [](https://icorderi.github.io/rust-uname/index.html) |
| 10 | |
| 11 | ## Basic usage |
| 12 | |
| 13 | ```rust |
| 14 | extern crate uname; |
| 15 | |
| 16 | use uname::uname; |
| 17 | |
| 18 | fn main() { |
| 19 | let info = uname().unwrap(); |
| 20 | |
| 21 | // Print the hostname |
| 22 | println!("{}", info.hostname); |
| 23 | // Print everything |
| 24 | println!("{:?}", info); |
| 25 | } |
| 26 | ``` |
| 27 | |
| 28 | Don't forget to check out the [examples](./examples) |
| 29 | |
| 30 | ## License |
| 31 | |
| 32 | Licensed under: |
| 33 | |
| 34 | - Apache License, Version 2.0 - [LICENSE-APACHE](LICENSE-APACHE) ([source](http://www.apache.org/licenses/LICENSE-2.0)) |
| 35 | - MIT license - ([LICENSE-MIT](LICENSE-MIT) ([source](http://opensource.org/licenses/MIT)) |
| 36 | |
| 37 | ## Contribution |
| 38 | |
| 39 | Unless you explicitly state otherwise, any contribution intentionally submitted |
| 40 | for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any |
| 41 | additional terms or conditions. |