【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

相关推荐
lengjingzju4 分钟前
一网打尽Linux IPC(三):System V IPC
linux·服务器·c语言
JIngJaneIL5 分钟前
基于springboot + vue房屋租赁管理系统(源码+数据库+文档)
java·开发语言·前端·数据库·vue.js·spring boot·后端
大聪明-PLUS5 分钟前
如何编写你的第一个 Linux 内核模块
linux·嵌入式·arm·smarc
知识分享小能手22 分钟前
Ubuntu入门学习教程,从入门到精通,Ubuntu 22.04文件压缩与解压缩知识点详解(12)
linux·学习·ubuntu
期待のcode25 分钟前
Java的抽象类和接口
java·开发语言
wadesir1 小时前
Go语言中高效读取数据(详解io包的ReadAll函数用法)
开发语言·后端·golang
用户6135411460161 小时前
Krb5-libs-1.18.2-5.ky10.x86_64.rpm 安装失败怎么办?附详细步骤
linux
千寻技术帮1 小时前
10422_基于Springboot的教务管理系统
java·spring boot·后端·vue·教务管理
Victor3561 小时前
Hibernate(12)什么是Hibernate的实体类?
后端
Victor3561 小时前
Hibernate(11)什么是Hibernate的持久化上下文?
后端