Expand description
§Upgrade
Read this in other languages: English, 简体中文.
§Description
A Rust crate to upgrade your program easily. (Based on self-replace.)
§Usage
Add this to your Cargo.toml
:
[dependencies]
upgrade = "^2"
§Example
use upgrade::upgrade;
fn main() {
upgrade("./upgrade.exe").unwrap();
}
Or call with args:
use upgrade::run_upgrade;
fn main() {
run_upgrade("./upgrade.exe", true, ["--upgraded"]).unwrap();
}
Re-exports§
pub extern crate self_replace;
Functions§
- Replace the current exe with the source path.
- A shortcut of
run_upgrade
without args.