I was wondering how are Rust crates are implemented.
For example, there is a crate named num_cpus
. This crate has this basic method num_cpus::get()
which tells number of CPUs in your computer.
My questions:
- How is the method
num_cpus::get()
implemented (is it done using another language?) - Can the same result be achieved with plain Rust code without using any crates?