simple_on_shutdown (cargo): This crate consists of a convenient macro to specify on shutdown callbacks (=code that should run when your program exits (grafecully)). It's super simple and stripped-down. 
Keywords: termination|callback|shutdown