NordSecurity / uniffi-bindgen-cs

C# bindings generator for uniffi-rs
https://github.com/NordSecurity/uniffi-bindgen-cs
Mozilla Public License 2.0
110 stars 21 forks source link

Lowercase the numeric types #37

Closed arg0d closed 1 year ago

arg0d commented 1 year ago

Lowercasing numeric types introduces a problem. In C# custom types are implemented with using directive, and the using directive expects and identifier on the right side of =. Lowercase numeric types are not identifiers, but rather reserved keywords. So its not possible to define a type alias using a lowercase numeric type as the underlying type. To use numeric types as the underlying type, the uppercase system type counterparts must be used

To generate correct code for custom types, create new filter type_name_custom, that formats these types in their respective system type counterparts.