【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

相关推荐
怀旧,1 分钟前
【Linux系统编程】18. Linux进程信号(上)
linux·运维·服务器
危桥带雨10 分钟前
FLASH代码部分
java·后端·spring
空中海14 分钟前
Redis 专家实战:生产架构设计 × 容量规划 × 安全治理 × 37道高频面试题全解
数据库·redis·安全
d111111111d14 分钟前
STM32-UART抽象层封装
笔记·stm32·单片机·嵌入式硬件·学习
minji...17 分钟前
Linux 线程同步与互斥(五) 日志,线程池
linux·运维·服务器·开发语言·c++·算法
沃虎Chinty-0317 分钟前
工程师笔记:三大磁性元器件(共模电感/一体成型电感/CHIP LAN)选型要点与实战避坑
单片机·嵌入式硬件
兩尛33 分钟前
c++面试常问2
开发语言·c++·面试
华清远见IT开放实验室40 分钟前
嵌入式系统化课程 学习内容与服务说明
linux·stm32·学习·嵌入式·全栈·虚拟仿真·测评中心
南村群童欺我老无力.42 分钟前
鸿蒙PC开发的路由导航参数传递的类型安全陷阱
安全·华为·harmonyos
Rust研习社44 分钟前
添加依赖库时的 features 是什么?优雅实现编译期条件编译与模块化开发
开发语言·后端·rust