【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

相关推荐
阿维的博客日记26 分钟前
Spring Cloud 为什么需要服务注册与发现中心这些东西?
后端·spring·spring cloud
笑而不语27 分钟前
13|元数据过滤检索:UserContext 与按用户查知识
后端
神仙别闹34 分钟前
基于 C# OpenPGP 的文件管理系统
开发语言·c#
fengfuyao98534 分钟前
利用 STM32 和 ADS1256 进行高精度数据采集
stm32·单片机·嵌入式硬件
飞飞传输43 分钟前
数字化科研提速关键 构建安全可控一体化跨网数据传输体系
大数据·运维·安全
番石榴AI1 小时前
纯 CPU 推理!0.1B 超轻量级端到端OCR模型,使用 Java 进行文档解析
java·开发语言·ocr
likerhood1 小时前
ConcurrentHashMap详细讲解(java)
java·开发语言·性能优化
黑白园1 小时前
ADC读取XY二轴操纵杆数据通过I2C_GPIO模拟 控制0.96寸OLED显示
stm32·单片机·嵌入式硬件
用户095367515831 小时前
Go:浮点数如何进行比较?
后端·go
wanhengidc1 小时前
服务器中带宽的重要性
运维·服务器·网络·安全·web安全