Processor - Rust Cookbook (original) (raw)
- Table of Contents
- About
- 1. Algorithms
- 2. Command Line
- 3. Compression
- 4. Concurrency
- 4.2. Data Parallelism
- 5. Cryptography
- 5.2. Encryption
- 6. Data Structures
- 7. Database
- 7.2. Postgres
- 8. Date and Time
- 8.2. Parsing and Displaying
- 9. Development Tools
- 9.2. Versioning
- 9.3. Build Time Tooling
- 10. Encoding
- 10.2. CSV processing
- 10.3. Structured Data
- 11. Error Handling
- 12. File System
- 12.2. Directory Traversal
- 13. Hardware Support
- 14. Memory Management
- 15. Network
- 16. Operating System
- 17. Science
- 18. Text Processing
- 18.2. String Parsing
- 19. Web Programming
- 19.2. URL
- 19.3. Media Types
- 19.4. Clients
Rust Cookbook
Processor
Check number of logical cpu cores
Shows the number of logical CPU cores in current machine using [num_cpus::get
].
fn main() {
println!("Number of logical cores is {}", num_cpus::get());
}