system_shutdown
system_shutdown provides a cross platform way to shut down, reboot or log out operations.
Supported platforms: Linux, Windows and macOS.
Usage
Add this to your Cargo.toml:
[dependencies]
lock_keys = "*"
and then:
use shutdown;
In most of the systems it does not requires the user to be root/admin.
Contributions
Pull Requests are welcome! =)
License
system_shutdown is licensed under either of the following, at your option: