[pmg-devel] [PATCH log-tracker v2] use pico-args instead of clap

Mira Limbeck m.limbeck at proxmox.com
Tue Feb 13 11:54:28 CET 2024

On 10/25/23 13:20, Dominik Csapak wrote:
> Instead of upgrading from clap3 to clap4 (which seems to change their
> interface every year or so), switch to the much smaller pico-args. (Same
> as we did for termproxy recently, see [0])
Got rid of 13 dependencies, while adding 1 (pico-args) according to
`cargo update` output.

> It has almost all features we need (except producing help output) and
> supports OsString, but wihout any dependencies. This decreases compile
> time and reduces the size of the resulting binary. It also reduces the
> lines of code.
> The only difference is now the different output for errors, e.g. for
> missing values of options.
> Help output is copied from the old clap output.
> 0: https://git.proxmox.com/?p=pve-xtermjs.git;a=commitdiff;h=24d707d0506b120a085b06b5f2b6000696879a1e
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
> changes from v1:
> * extracted the pkg_version into a variable for interpolated use
> * improved commit message, e.g. by referencing the termproxy commit
>  Cargo.toml  |   2 +-
>  src/main.rs | 223 +++++++++++++++++++---------------------------------
>  2 files changed, 83 insertions(+), 142 deletions(-)

Looks good to me.

Tested it both via GUI (which calls the CLI) and the CLI directly.

Tested-by: Mira Limbeck <m.limbeck at proxmox.com>
Reviewed-by: Mira Limbeck <m.limbeck at proxmox.com>

More information about the pmg-devel mailing list