dnf5
dnf5 copied to clipboard
bindings: Fix and enable builds with Go bindings
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.