Skip to content

Get and build device information with cross-platform support

License

Notifications You must be signed in to change notification settings

maspectra/device-info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

device-info

This is a Rust implementation to obtain device information. It is heavily inspired by C# library DeviceId.

Usage

Lib

let mut builder = MainDeviceInfoBuilder::new();
 builder
        .add_user_name()
        .add_platform_name()
        .add_device_name()
        .add_cpu_arch()
        .add_os_distro()
        .on_windows(|windows_builder| {
            windows_builder
                .add_logon_user_name()
                .add_system_drive_serial_number()
                .add_mother_board_serial_number()
                .add_system_uuid()
                .add_mac_address()
                .add_processor_id()
                .add_machine_guid()
        })
        .on_macos(|macos_builder| {
            macos_builder
                .add_platform_serial_number()
                .add_system_drive_serial_number()
        });

Command Line

device-info --help

About

Get and build device information with cross-platform support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages