Skip to content

Refactor argument parsing and fix building on musl-based sytems#20

Open
CuriouslyCurious wants to merge 7 commits intoRedrrx:mainfrom
CuriouslyCurious:arg-parsing
Open

Refactor argument parsing and fix building on musl-based sytems#20
CuriouslyCurious wants to merge 7 commits intoRedrrx:mainfrom
CuriouslyCurious:arg-parsing

Conversation

@CuriouslyCurious
Copy link

This MR overhauls the argument-parsing to use more descriptive names as well as to use clap-builder instead of clap-derive to facilitate a completely static build on musl-based systems.

This also replaces log4rs with fern for the same static build reason, functionality should be the same.

On Alpine the linker is not named just musl-gcc, thus causing any
builds to fail. Cargo detects the linker just fine without this.
Reason is log4rs usesderive macros which are not statically compilable on
musl-based systems which makes it impossible to create an entirely statically
linked binary
clap-derive causes build failures when using '-crt-static', so it was
replaced with clap-builder.

Argument parsing was overhauled to be less redundant and more clear.
This allows `cargo install` to work on musl-systems
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant