machine_uuid

Crates.iomachine_uuid
lib.rsmachine_uuid
version0.1.0
sourcesrc
created_at2020-02-27 22:33:59.733314
updated_at2020-02-27 22:33:59.733314
descriptionA library to retrieve a machines UUID
homepage
repositoryhttps://github.com/choicesourcing/machine_uuid
max_upload_size
id213273
size9,904
(choicesourcing)

documentation

https://docs.rs/machine_uuid

README

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"
Commit count: 29

cargo fmt