【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

相关推荐
wljy1几秒前
二、静态库的制作和使用
linux·c语言·开发语言·c++
何陋轩10 分钟前
Spring AI实战指南:在Java项目中集成大语言模型
人工智能·后端·机器学习
道剑剑非道13 分钟前
FFmpeg 6.0 实战:用 C++ 封装摄像头采集与 RTSP 推流
开发语言·c++·ffmpeg
mzhan01720 分钟前
Linux: coredump产生对程序退出的影响
linux·运维·服务器
天天进步201529 分钟前
Python全栈项目实战:基于深度学习的语音合成(TTS)系统
开发语言·python·深度学习
OctShop大型商城源码41 分钟前
.NET线上商城源码_C#商城源码_技术赋能下的电商新生态
开发语言·c#·.net·商城系统源码
光电笑映43 分钟前
从环境变量到进程虚拟地址空间——Linux 内存管理的底层脉络
linux·服务器·c++·c
源远流长jerry1 小时前
Linux 网络收包机制:从网卡到 Socket 的完整路径
linux·运维·服务器·网络·网络协议·tcp/ip
用户8356290780511 小时前
Python 操作 PowerPoint 表格的创建与格式化
后端·python
IT猿手1 小时前
光伏模型参数估计:基于山羊优化算法(GOA )的光伏模型参数辨识问题求解研究,免费提供完整MATLAB代码链接
开发语言·算法·matlab·群智能优化算法·智能优化算法·光伏模型参数估计·光伏模型参数辨识