【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

相关推荐
oak隔壁找我8 分钟前
MyBatis的MapperFactoryBean详解
后端
王道长AWS_服务器8 分钟前
AWS Elastic Load Balancing(ELB)—— 多站点负载均衡的正确打开方式
后端·程序员·aws
一念&13 分钟前
每日一个C语言知识:C 数组
c语言·开发语言·算法
oak隔壁找我14 分钟前
Spring BeanFactory 和 FactoryBean 详解
后端
用户40993225021215 分钟前
只给表子集建索引?用函数结果建索引?PostgreSQL这俩操作凭啥能省空间又加速?
后端·ai编程·trae
oak隔壁找我15 分钟前
SpringMVC 教程
后端
用户343259627881615 分钟前
Spring AI Alibaba中使用Redis Vector报错修改过程
后端
小年糕是糕手16 分钟前
【数据结构】单链表“0”基础知识讲解 + 实战演练
c语言·开发语言·数据结构·c++·学习·算法·链表
oak隔壁找我16 分钟前
MyBatis和SpringBoot集成的原理详解
后端
oak隔壁找我17 分钟前
SpringBoot @Import 注解详解
后端