【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

相关推荐
七夜zippoe3 分钟前
事件驱动架构:构建高并发松耦合系统的Python实战
开发语言·python·架构·eda·事件驱动
码咔吧咔6 分钟前
STM32芯片简介,以及STM32的存储器映射是什么?
stm32·单片机·嵌入式硬件
古城小栈9 分钟前
Rust 泛型 敲黑板
rust
古城小栈10 分钟前
Rust Trait 敲黑板
开发语言·rust
hashiqimiya35 分钟前
springboot事务触发滚动与不滚蛋
java·spring boot·后端
喵了meme39 分钟前
Linux学习日记24:Linux网络编程基础
linux·网络·学习
FL171713141 小时前
MATLAB的Sensitivity Analyzer
开发语言·matlab
TeamDev1 小时前
基于 Angular UI 的 C# 桌面应用
前端·后端·angular.js
whlqjn_12111 小时前
linux下使用SHC对Shell脚本进行封装和源码隐藏
linux·centos
PPPHUANG1 小时前
一次 CompletableFuture 误用,如何耗尽 IO 线程池并拖垮整个系统
java·后端·代码规范