【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

相关推荐
eewj42 分钟前
STM32中FCLK时钟信号的作用
stm32·单片机·嵌入式硬件
XXOOXRT1 小时前
基于SpringBoot的加法计算器
java·spring boot·后端·html5
qq_589568101 小时前
centos6.8镜像源yum install不成功,无法通过镜像源下载的解决方式
linux·运维·centos
yugi9878381 小时前
基于遗传算法优化主动悬架模糊控制的Matlab实现
开发语言·matlab
weixin_516023071 小时前
linux下fcitx5拼音的安装
linux·运维·服务器
淘晶驰AK2 小时前
ESP32和STM32哪个更容易学?
stm32·单片机·嵌入式硬件
moxiaoran57532 小时前
Go语言的错误处理
开发语言·后端·golang
hunter14502 小时前
Linux 进程与计划任务
linux·运维·服务器
yugi9878382 小时前
MATLAB的多层感知器(MLP)与极限学习机(ELM)实现
开发语言·matlab
楼田莉子2 小时前
Linux学习之磁盘与Ext系列文件
linux·运维·服务器·c语言·学习