Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jwilm/rust_daemon_template
Template for writing daemons in Rust
https://github.com/jwilm/rust_daemon_template
Last synced: 3 months ago
JSON representation
Template for writing daemons in Rust
- Host: GitHub
- URL: https://github.com/jwilm/rust_daemon_template
- Owner: jwilm
- License: unlicense
- Archived: true
- Created: 2017-08-13T01:12:46.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-18T00:40:26.000Z (about 7 years ago)
- Last Synced: 2024-07-18T08:45:48.307Z (4 months ago)
- Language: Rust
- Size: 10.7 KB
- Stars: 14
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Rust Daemon Template
====================This is a template for writing a daemon using Rust. The template includes
* Command-line argument parsing
* Config loading from hard-coded location using yaml
* A `run()` function called by `main()` to support `?` operator. Errors returned
from `run()` are simply printed to stderr using the `Display` impl, and the
process exits with `1`.
* Logging to stderr using the log crate and controlled by the command line -v
flags.
* Signal handlingTo get started, clone this project and `s/rust_daemon_template/foo/`.
The template can run out of the box using
```
cargo run -- --config ./config.yml.example
```To add application logic, edit the `App` type and its `Application` impl in
_app.rs_, the command-line options in _cli.rs_, and the config file format in
_config.rs_.## FAQ
* _Where is the daemonization logic?_ There isn't any; your system's process
manager should be able to handle this for you.