【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

相关推荐
QX_hao1 小时前
【Go】--反射(reflect)的使用
开发语言·后端·golang
小坏讲微服务1 小时前
Docker-compose 搭建Maven私服部署
java·spring boot·后端·docker·微服务·容器·maven
inferno1 小时前
Maven基础(二)
java·开发语言·maven
我是李武涯1 小时前
从`std::mutex`到`std::lock_guard`与`std::unique_lock`的演进之路
开发语言·c++
yuuki2332331 小时前
【数据结构】用顺序表实现通讯录
c语言·数据结构·后端
你的人类朋友2 小时前
【Node】手动归还主线程控制权:解决 Node.js 阻塞的一个思路
前端·后端·node.js
史不了2 小时前
静态交叉编译rust程序
开发语言·后端·rust
Johnny.Cheung2 小时前
非常好的Rust自动管理内存的例子
rust·内存管理·析构函数
KYGALYX3 小时前
在Linux中备份msyql数据库和表的详细操作
linux·运维·数据库
读研的武3 小时前
DashGo零基础入门 纯Python的管理系统搭建
开发语言·python