A Rust library for hot restarting applications without downtime. Provides seamless process replacement for servers and long-running services, enabling zero-downtime updates and configuration reloads.
To use this crate, you can run cmd:
cargo add hot-restart
use hot_restart::*;
async fn before_restart_hook() {}
#[tokio::main]
async fn main() {
let res = hot_restart(
&["--once", "-x", "check", "-x", "build", "--release"],
before_restart_hook(),
)
.await;
println!("hot_restart result: {:?}", res);
}
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request.
For any inquiries, please reach out to the author at [email protected].