【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

相关推荐
布莱克6057 小时前
Swift 类详解:从定义、继承到内存管理的完整指南
服务器·开发语言·ios·ssh·swift·类
无敌贵点大王7 小时前
从寄存器层面重学STM32(15)——IIC理论
stm32·单片机·嵌入式硬件
是main不是漫8 小时前
【快慢指针 | LeetCode202 快乐数】鸽巢原理佐证环特性,快慢指针巧解快乐数
c语言·开发语言·c++·算法
果果软件8 小时前
2026 后台管理系统选型:若依、JeecgBoot、芋道、NocoBase 和 GewuMind Boot 怎么选?
java·人工智能·后端·ai·开源
布莱克6059 小时前
Swift 方法详解:实例方法、类型方法与 mutating 机制
服务器·开发语言·ios·ssh·swift·方法
时间的拾荒人10 小时前
Linux 系统命令与网络、磁盘、日志监控(下篇):性能原理与优化
linux·运维·网络
金色熊族10 小时前
qt5.15.9编译qt-creator7.0.2源码
linux·qt
Rabitebla10 小时前
【Linux】文件篇(五):手撕简易 FILE——模拟实现 C 标准 I/O 缓冲机制
linux·服务器·c语言·笔记·学习·ubuntu
蜗牛一步步往上爬11 小时前
第十章 使用编辑器
linux
Risehuxyc11 小时前
PHP能不能在参数里放匿名函数
开发语言·php