mozilla / cbindgen

A project for generating C bindings from Rust code
Mozilla Public License 2.0
2.4k stars 311 forks source link

export.mangle rename_types = "snake_case" not working #763

Open TomzBench opened 2 years ago

TomzBench commented 2 years ago

i have

[export.mangle]
rename_types = "snake_case"

I have structs such as MyStruct, and i expect the header to rename this type to my_struct however it does not seem to be renamed in the header.

morrisonlevi commented 2 years ago

Based on tests, this has to do with renaming generic names, like Foo<u8> into Foo_u8 or FooU8, etc. PR #703 allows renaming items with a rule, but it's now been stale for a year and is definitely out of date.