【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

相关推荐
阿蒙Amon几秒前
C#每日面试题-重写和重载的区别
开发语言·c#
是一个Bug4 分钟前
Java基础20道经典面试题(二)
java·开发语言
Z_Easen7 分钟前
Spring 之元编程
java·开发语言
liliangcsdn13 分钟前
python下载并转存http文件链接的示例
开发语言·python
我命由我1234522 分钟前
SVG - SVG 引入(SVG 概述、SVG 基本使用、SVG 使用 CSS、SVG 使用 JavaScript、SVG 实例实操)
开发语言·前端·javascript·css·学习·ecmascript·学习方法
阿蒙Amon23 分钟前
C#每日面试题-委托和事件的区别
java·开发语言·c#
货拉拉技术36 分钟前
出海技术挑战——Lalamove智能告警降噪
人工智能·后端·监控
最贪吃的虎38 分钟前
Git: rebase vs merge
java·运维·git·后端·mysql