| Crates.io | riscfetch-core |
| lib.rs | riscfetch-core |
| version | 2.1.0 |
| created_at | 2025-12-13 18:50:46.986989+00 |
| updated_at | 2025-12-20 06:58:10.241287+00 |
| description | RISC-V system information library - ISA extensions, hart count, hardware IDs |
| homepage | |
| repository | https://github.com/kako-jun/riscfetch |
| max_upload_size | |
| id | 1983288 |
| size | 67,205 |
RISC-V system information library. Query ISA extensions, hardware IDs, vector capabilities, and more.
use riscfetch_core::*;
if is_riscv() {
println!("ISA: {}", get_isa_string());
println!("Extensions: {}", get_extensions_compact());
println!("Harts: {}", get_hart_count());
let hw = get_hardware_ids();
println!("Vendor: {}", hw.mvendorid);
}
| Function | Returns |
|---|---|
is_riscv() |
bool - architecture check |
get_isa_string() |
Full ISA string from /proc/cpuinfo |
get_extensions_compact() |
"I M A F D C V" format |
get_extensions_explained() |
Vec of (name, description) |
get_z_extensions() |
Z-extension string |
get_z_extensions_explained() |
Vec of (name, description) |
get_vector_detail() |
VLEN info if V extension present |
get_hardware_ids() |
HardwareIds struct |
get_hart_count() |
Formatted string "N harts" |
get_cache_info() |
L1D/L1I/L2/L3 sizes |
collect_riscv_info() |
RiscvInfo struct (RISC-V specific only) |
collect_all_info() |
SystemInfo struct (includes system info) |
MIT