dnf5 icon indicating copy to clipboard operation
dnf5 copied to clipboard

bindings: Fix and enable builds with Go bindings

Open hellozee opened this issue 2 years ago • 0 comments

Fixes #719

Ok, disclaimer, I am neither a SWIG expert nor a dnf one but I was just poking around the codebase.

With that being clear, its a rough take on exposing the API.

  • Disables a lot of the callbacks relying on std::unique_ptr, which I don't know if important or not.
  • Changed the API a bit on the libdnf/conf/vars, there is one more copy down the line but we avoid exposing unique_ptr to the API
  • SWIG/Go doesn't like constexpr const char* which is a bit annoying but can be worked around
  • the only thing I couldn't figure out was the Config::opt_bind, SWIG thinks it returns a pointer and not a reference

Definitely need some help.

hellozee avatar Dec 12 '23 21:12 hellozee