Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Difference From qsu-0.0.7 To qsu-0.1.0
2024-01-16
| ||
15:59 | Crate maintenance: Update apperr to 0.2.0, and fix a bug that was uncovered by it. check-in: f22db69940 user: jan tags: trunk | |
2024-01-10
| ||
13:53 | Documentation updates and prepare for 0.1.0. check-in: 54ae1190a4 user: jan tags: qsu-0.1.0, trunk | |
2023-12-13
| ||
13:06 | Add missing comma. check-in: d9feea0cec user: jan tags: trunk | |
2023-12-12
| ||
05:22 | Use apperr crate instead of using an in-tree implementation of AppErr. check-in: 49f2ff9578 user: jan tags: trunk | |
2023-12-11
| ||
11:35 | Release maintenance. check-in: a01d88982c user: jan tags: qsu-0.0.7, trunk | |
2023-12-09
| ||
11:38 | Update dependencies. Release maintenance. check-in: 13c503aedd user: jan tags: trunk | |
Changes to Cargo.toml.
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | [package] name = "qsu" |
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | + - - - + + + - - + + - - + + - + - - + + | systemd = ["dep:sd-notify"] rocket = ["rt", "dep:rocket", "tokio"] rt = [] tokio = ["rt", "tokio/macros", "tokio/rt-multi-thread", "tokio/signal"] wait-for-debugger = ["dep:dbgtools-win"] [dependencies] apperr = { version = "0.1.0" } |
︙ |
Changes to src/argp.rs.
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | //! Helpers for integrating clap into an application using _qsu_. //! //! The purpose of the argument parser is to allow a semi-standard command line //! interface for registering, deregistering and allowing services to run both //! in the foreground as well as run as actual services. To accomplish this, //! the argument parser wraps around the runtime. Specifically, this means //! that if the argument parser is used, the application does not need to //! launch the runtime explicitly; the argument parser will do this if the //! appropriate arguments have been passed to it. //! //! Assuming a service handler has been implemented already, a simple use-case //! for the argument parser in a server application involves: //! 1. Implement the [`ArgsProc`] trait on an application object, and implement //! the [`ArgsProc::build_apprt()`] method. This method should return a //! [`SrvAppRt`] object, containing the service handler. //! 2. Create an instance of the [`ArgParser`], passing in the service name and //! a reference to an [`ArgsProc`] object. //! 3. Call [`ArgParser::proc()`] to process the command line arguments. //! //! The argument parser will determine whether the caller requested to //! register/deregister the service, run the server application in foreground //! mode or as a system service. //! //! # Customization //! While the argument parser in _qsu_ is rather opinionated, it does allow //! for _some_ customization. The names of the subcommands to (de)register or //! run the server application as a service can be modified by the //! application. It is possible to register custom subcommands, and the //! command line parser specification can be modified by the [`ArgsProc`] //! callbacks. use clap::{builder::Str, Arg, ArgAction, ArgMatches, Args, Command}; use crate::{ err::{AppErr, Error}, installer::{self, RegSvc}, lumberjack::LogLevel, |
︙ | |||
192 193 194 195 196 197 198 199 200 201 202 203 204 205 | 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | + + | pub fn from_cmd_match(matches: &ArgMatches) -> Self { let svcname = matches.get_one::<String>("svcname").unwrap().to_owned(); Self { svcname } } } /// Used to differentiate between running without a subcommand, or the /// install/uninstall or run service subcommands. pub enum Cmd { Root, Inst, Rm, Run } |
︙ |
Changes to src/err.rs.
| 1 2 3 4 5 6 7 8 9 10 | - + + + |
|
︙ | |||
233 234 235 236 237 238 239 | 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | #[cfg(windows)] impl From<windows_service::Error> for Error { fn from(err: windows_service::Error) -> Self { Error::SubSystem(err.to_string()) } } |
Changes to src/lib.rs.
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | //! _qsu_ is a set of tools for integrating a server application against a //! service subsystem (such as |
︙ |
Changes to www/changelog.md.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | + + + + + + + + + | # Change log ## [Unreleased] ### Added ### Changed ### Removed --- ## [0.1.0] - 2024-01-10 ### Changed - Use apperr crate for `AppErr` instead of using a custom in-tree implementation. --- ## [0.0.7] - 2023-12-09 ### Changed - Use [rocket 0.5.0](https://rocket.rs/v0.5/news/2023-11-17-version-0.5/) |
︙ |