【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

相关推荐
陈随易1 分钟前
VSCode v1.102发布,AI体验大幅提升
前端·后端·程序员
linux kernel9 分钟前
第七讲:C++中的string类
开发语言·c++
杰夫贾维斯10 分钟前
CentOS Linux 8 的系统部署 Qwen2.5-7B -Instruct-AWQ
linux·运维·人工智能·机器学习·centos
生无谓15 分钟前
什么是跨域,如何处理跨域
后端
Smilejudy16 分钟前
极具特色的位置运算
后端
码出极致17 分钟前
支付线上问题复盘的“5W”框架
后端
玩代码23 分钟前
Java线程池原理概述
java·开发语言·线程池
ezl1fe25 分钟前
RAG 每日一技(三):不止文本,代码和Markdown如何优雅地分块?
后端
jack_yin26 分钟前
手把手教你玩转 telegram-deepseek-bot 的 Admin 管理后台!
后端
浮游本尊27 分钟前
Java学习第8天 - Spring框架入门与依赖注入
后端