Swift imports C apis while taking into account clang nullability attributes: _Nullable
& _Nonnull
which results in Optional<UnsafePointer<T>
and UnsafePointer<T>
for the respective Swift generated C bindings, these should map to the Rust option equivalent
There was a previous attempt to use implement this feature #1876, however the title is wrong, as these are clang level annotations and not objective-c exclusive annotations, in other words, hey can work on any plain C header, and are independent from objective-c rust support
Sources: