1 unstable release

0.1.0 Feb 27, 2020

#667 in Procedural macros

Download history 19/week @ 2024-02-18 30/week @ 2024-02-25 11/week @ 2024-03-03 15/week @ 2024-03-10 4/week @ 2024-03-17

62 downloads per month
Used in 2 crates

MIT/Apache

7KB
79 lines

Machine UUID

A library that retrieves UUID for a machine

OS Support

  1. Windows - depends on WMIC
  2. Linux - depends on /etc/machine-id

Usage

let uuid = machineid::get();

// Based on OS, UUID format will differ
// Windows
assert_eq!("140EF834-2DB3-0F7A-27B4-4CEDFB73167C", uuid);
 
// Based on OS, UUID format will differ
// Linux
assert_eq!("92cc698195f84d3b85f1cfb0a09e957f", uuid);

Add this to your Cargo.toml:

[dependencies]
machine_uuid = "0.1.0"

Dependencies

~2.1–3MB
~53K SLoC