Bindgen - wchar_t is always converted to u16

Hi! Could anyone help me with this please: wchar_t is always replaced with u16 · rust-lang/rust-bindgen · Discussion #3029 · GitHub

Thank you for your help.
Regards, Christian

Bindgen doesn't support generating portable code. It generates code only for a single platform.

If the ABI of the C library is stable, I suggest generating the bindings once, and then editing them manually to fix portability issues.

If the C library ABI can change, you will have to generate bindings at build time, and they will be valid only for the specific platform being built.

1 Like

Thanks for your answer. I will remove the bindings' generation from build.rs and generate them with the CLI once.

Greetings, Christian