【My Rust Crate】obtaining Linux system device information

Project Introduction

  • get_local_info is a Rust crate that obtains linux device information,Its goal is to solve the difficulty of obtaining Linux system device information.Support Chinese operating systems such as KyLin, UOS, HarmonyOS, etc

    Project maintenance: long-term

Current features:

Obtain activity network card information: Netcard IPv4 IPv6 mac

How to use

1.cargo add get_local_info

2.Import into your project

复制代码
extern crate get_local_info;

fn main() {

    println!("{}", get_local_info::get_pc_net_card_name());
    println!("{}", get_local_info::get_pc_ipv4());
    println!("{}", get_local_info::get_pc_ipv6());
    println!("your mac:{}", get_local_info::get_pc_mac());
}

About the Author

相关推荐
s09071367 分钟前
ZYNQ7000 AXI DMA 接收中断(S2MM_introut)全解析:从硬件原理到Linux驱动开发
linux·驱动开发·dma·zynq
wal131452011 分钟前
OpenClaw v2026.4.8 发布:记忆系统重大升级 + 多项安全修复
人工智能·安全·openclaw
camellias_20 分钟前
ubuntu(二)ubuntu18.04安装mysql8
linux·ubuntu·adb
藤谷性能21 分钟前
Ubuntu 22.04:安装串口调试助手CoolTerm
linux·运维·ubuntu·串口·coolterm
路溪非溪34 分钟前
如何使用sysfs来排查驱动问题
linux·arm开发·驱动开发
上海合宙LuatOS37 分钟前
LuatOS扩展库API——【exremotecam】网络摄像头控制
开发语言·网络·物联网·lua·luatos
丶伯爵式38 分钟前
Ubuntu 新装后常用设置
linux·运维·ubuntu
言慢行善39 分钟前
SpringBoot中的注解介绍
java·spring boot·后端
哼?~41 分钟前
Socket编程准备
linux·网络
feng_you_ying_li43 分钟前
C++11,{}的初始化情况与左右值及其引用
开发语言·数据结构·c++