sudo
Detect if you are running as root, restart self with sudo if needed
Example:
First, add sudo to your Cargo.toml:
# for now:
sudo = { git = "https://gitlab.com/dns2utf8/sudo.rs.git" }
# once this crate is on crates.io
# sudo = "0.2"
In your main.rs: