mortem 0.1.0

Easy self-deleting executables
Documentation

Mortem

Crates.io docs.rs

Easy self-deleting executable.

Usage

Simply register a guard (either soft or hard) in the program entrypoint, and have it be dropped to delete the binary.

fn main() {
    let _mortem = mortem::hard(); // register mortem guard

    // some code
    println!("Hello!")

    // _mortem drops and executable is deleted
}

What's with soft and hard?

The soft handler exits on IO errors and only tries to delete the executable once; the hard handler keeps trying till the executable is successfully deleted.

Examples

See the documentation.