sgrif / mysqlclient-sys

Rust bindings for libmysqlclient
Apache License 2.0
37 stars 31 forks source link

enums are incompatible with libmysql 8.0.4 on Windows 10 #15

Closed ian-p-cooke closed 5 months ago

ian-p-cooke commented 5 years ago

The enums don't match up to the headers for the latest version of mysql. Specifically the mysql options enum value for MYSQL_DEFAULT_AUTH is different but there are probably a bunch. I used bindgen to regenerate the windows bindings and that seemed to work but it would be great if you could document how you generated the existing ones in the repo (specific flags to bindgen, etc).

what I did:

> rust install bindgen
> bindgen C:\vcpkg\installed\x64-windows-static\include\mysql\mysql.h --default-enum-style=rust -o .\src\bindings_windows.rs

I ran into some problems with diesel expecting some now bool-typed values that were c_int but that wasn't much work to fix. It works thus far but I think I may have regenerated too much... the resulting file is huge compared to what it was (10MB vs 50KB).

Can you regenerate the bindings and do a new major release?

nico-abram commented 3 years ago

@sgrif (I apologize for the ping but the age of the issue suggests to me that no one has seen it) as mentioned above, is the way the bindings were generated (bindgen, manually, etc) documented anywhere?

Would a PR attempting to fix these be desireable?

weiznich commented 5 months ago

Fixed with #40 by adding different prebuilt bindings for different versions