update_me

Crates.ioupdate_me
lib.rsupdate_me
version0.2.0
sourcesrc
created_at2022-11-17 14:00:54.436714
updated_at2022-11-21 15:58:20.130079
descriptionUtility to implement self-updating standalone executables
homepage
repositoryhttps://codeberg.org/lennart/update_me
max_upload_size
id717262
size7,012
Lennart Coopmans (LennartC)

documentation

README

crates.io:clin docs

Update Me: self updating Rust executables

update_me provides functionality to implement a self-updating Rust executable.

The executable can update itself by replacing the current executing file with a newer version.

This library only implements the updating mechanism itself, thereby providing full flexibility to implement different release distribution backends.

Example of updating from a file:

use update_me;

pub fn update(path: &String) -> Result<()> {
    let mut file = File::open(path)?;
    let mut data: Vec<u8> = Vec::new();
    file.read_to_end(&mut data)?;
    
    update_me::apply(&mut data)?;
    
    Ok(())
}

See also

  • self_update: provides updaters for updating rust executables in-place from various release distribution backends.
Commit count: 0

cargo fmt