I thought it would be cool if there was a tool that can automatically hook up Rust binaries with systemd, based on Cargo data.
e.g. you’ve written a web server, you run
cargo integrate-with-systemd, magic happens, and your server is correctly set up to automatically start via systemd integration, with logging, restarting, etc. Data is taken from
Cargo.toml and you don’t need to mess with config files.
However, I’m not sure how far to take that magic part.
should it use current binary path, in
./target/release, or rather copy it to some more appropriate place like
if it installs binaries, should it build a
.debpackage for them first, and install that package, so they’re properly installed?
Should it scan your dependencies to figure out more advanced config? e.g. set up logging if you use the
logcrate? Or configure the service to wait for network if it sees you use