【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

  • Liu Qiang in Wuhan, China
  • crates: https://crates.io/crates/get_local_info
  • github: GitHub - daijianshusheng/rs_libGetDeviceInfo: Getlocalinfo is a Rust crate that obtains local information
  • create time:2023.12.28

你可能感兴趣的:(rust,开发语言,linux,鸿蒙系统,安全,嵌入式硬件,后端)