#cpuid #cpu #std

lscpu

Implementation of lscpu in rust

8 stable releases

Uses new Rust 2024

new 1.0.7 Mar 29, 2025
1.0.6 Mar 20, 2025

#278 in Hardware support

Download history 183/week @ 2025-03-05 387/week @ 2025-03-12 129/week @ 2025-03-19

699 downloads per month

GPL-3.0 license

18KB
571 lines

lscpu

crates.io github docs.rs

Implementation of lscpu in rust

Run a std example

cargo run --example std

This code can be runned also in a no-std environment.

Cpu Data:

pub struct Cpu {
    pub architecture: &'static str,
    pub cpu_op_modes: &'static str,
    pub address_sizes: String,
    pub byte_order: &'static str,
    pub cpu_count: u32,
    pub on_line_cpu: u32,
    pub vendor_id: String,
    pub model_name: String,
    pub cpu_family: u32,
    pub cpu_model: u32,
    pub is_hybrid: &'static str,
    pub threads_per_core: u32,
    pub cores_per_socket: u32,
    pub sockets: u32,
    pub stepping: u32,
    pub boost_enabled: &'static str,
}

Dependencies