#elevated #sudo #privileges #runas

privilege

Cross-platform library for administrative permission handling

3 releases (breaking)

0.3.0 Aug 6, 2023
0.2.0 Jun 24, 2023
0.1.0 Jun 10, 2023

#6 in #elevated

Download history 183/week @ 2024-07-29 210/week @ 2024-08-05 191/week @ 2024-08-12 131/week @ 2024-08-19 206/week @ 2024-08-26 69/week @ 2024-09-02 136/week @ 2024-09-09 257/week @ 2024-09-16 266/week @ 2024-09-23 162/week @ 2024-09-30 288/week @ 2024-10-07 163/week @ 2024-10-14 310/week @ 2024-10-21 226/week @ 2024-10-28 158/week @ 2024-11-04 129/week @ 2024-11-11

849 downloads per month
Used in 11 crates (9 directly)

MIT license

16KB
356 lines

privilege Crates.io License

Cross-platform library for administrative permission handling.

Features

  • Check Administrative Permissions: Easily determine if the current process has administrative or root permissions.
  • Execute Commands with Administrative Privileges: Run commands with elevated permissions, ensuring secure and proper execution of critical operations.

Supported platform

  • Linux
  • macOS
  • Windows

Usage

Add privilege to your dependencies

[dependencies]
privilege = "0.3"

For more details, see examples or doc.

Dependencies

~2–15MB
~148K SLoC