]> git.proxmox.com Git - rustc.git/blob - src/vendor/num_cpus/README.md
New upstream version 1.19.0+dfsg1
[rustc.git] / src / vendor / num_cpus / README.md
1 # num_cpus
2
3 [![crates.io](http://meritbadge.herokuapp.com/num_cpus)](https://crates.io/crates/num_cpus)
4
5 Count the number of CPUs on the current machine.
6
7 ## Usage
8
9 Add to Cargo.toml:
10
11 ```toml
12 [dependencies]
13 num_cpus = "1.0"
14 ```
15
16 In your `main.rs` or `lib.rs`:
17
18 ```rust
19 extern crate num_cpus;
20
21 // elsewhere
22 let num = num_cpus::get();
23 ```
24
25 ## License
26
27 Licensed under either of
28
29 * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
30 * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
31
32 at your option.
33
34 ### Contribution
35
36 Unless you explicitly state otherwise, any contribution intentionally submitted
37 for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
38 additional terms or conditions.