Crate upgrade

Source
Expand description

§Upgrade

Crate GitHub last commit GitHub issues GitHub pull requests GitHub

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§

run_upgrade
Replace the current exe with the source path.
upgrade
A shortcut of run_upgrade without args.