| Crates.io | update_me |
| lib.rs | update_me |
| version | 0.2.0 |
| created_at | 2022-11-17 14:00:54.436714+00 |
| updated_at | 2022-11-21 15:58:20.130079+00 |
| description | Utility to implement self-updating standalone executables |
| homepage | |
| repository | https://codeberg.org/lennart/update_me |
| max_upload_size | |
| id | 717262 |
| size | 7,012 |
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(())
}