Fix package name for Rust naming convention

This commit is contained in:
Sebastian Cabrera 2024-06-23 00:25:31 -04:00
parent f98ab3eb82
commit f2ceea0cc1
No known key found for this signature in database
GPG key ID: 9C70960A46161D08
2 changed files with 6 additions and 3 deletions

View file

@ -1,5 +1,5 @@
[package]
name = "Oxide"
name = "oxide"
version = "0.1.0"
edition = "2021"

View file

@ -5,17 +5,20 @@ fn main() {
}
fn get_sys_info() {
// Please note that we use "new_all" to ensure that all list of
// components, network interfaces, disks and users are already
// filled!
let mut sys = System::new_all();
// First we update all information of our `System` struct.
sys.refresh_all();
// Display system information:
// Print system information:
println!("System name: {:?}", System::name());
println!("Kernel version: {:?}", System::kernel_version());
println!("System OS version: {:?}", System::os_version());
println!("System host name: {:?}", System::host_name());
// Number of CPUs:
// Print number of CPUs:
println!("Number of CPUs: {}", sys.cpus().len());
}