rust-bindgen icon indicating copy to clipboard operation
rust-bindgen copied to clipboard

Over enforced naming in shared library name?

Open All8Up opened this issue 5 months ago • 0 comments

While using bindgen against a library with a name such as '-1.0.0', bindgen generates " is not a valid Ident". This seems overly restrictive given that many libraries use such conventions. Renaming to '_1.0.0' also produces the same issue as '.' is not allowed in the name. Bindgen seems to be forcing a validation of the name against Rust "Ident" which is severely limiting when used against common library naming practices. I would expect that the name of the shared library should allow arbitrary conventions without this limit as the generated code does not seem to reference the name in any notable manner, at least with the settings I'm using.

All8Up avatar May 21 '25 13:05 All8Up