Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change dependencies #1191

Closed
mathisloge opened this issue Jan 7, 2024 · 2 comments
Closed

Change dependencies #1191

mathisloge opened this issue Jan 7, 2024 · 2 comments

Comments

@mathisloge
Copy link
Contributor

mathisloge commented Jan 7, 2024

Is your feature request related to a problem? Please describe.

I think it might make sense to switch to some other dependencies, which might be more maintained. I don't want to be rude here or something else, but snapcast depends on aixlog and popl which haven't seen any commits since 3 years now.

I would take the work on me to change the deps as follows:

  • Introduce https://github.com/fmtlib/fmt for all string formatting. to_string especially for floats and double it is quite slow and inaccurate.
  • aixlog -> spdlog (only dependency is fmt) (especially good to have the different log sinks, systemd-journal, android, etc.)
  • popl -> CLI11 (can parse ini and toml config files, so the config format won't have to change)

Those are all really common and high quality libraries and available on the typical systems:

I hope to get more familar with the source code with this work to contribute more in the future, since it works really great already for me at home.

@StefanBruens
Copy link

Instead of libfmt, just using C++20 (std::fmt) may be the simpler option. Current spdlog supports std::fmt instead of libfmt.

@badaix
Copy link
Owner

badaix commented May 21, 2024

I think it's always a good idea to use existing, mature libraries instead of reinventing the wheel, but when I started with Snapcast I didn't find any simple logger, nor I found any simple command line parser, that was supporting Linux, Windows, MacOS and Android. Especially for Android it's desirable to have a header only libs.
Popl has also the advantage that it can be fet from command line as well as from an ini file. Both libraries didn't cause a single issue in the last ten years of Snapcast, so I prefer sticking to them.
Btw: there is a branch of aixlog that supports std::fmt.

@badaix badaix closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants