This first commit only supports the C bridge, and only callback
functions that don't return anything at that. But that's sufficient to
fully cover ChatListener and ProvisioningListener.
- All public Swift-defined structs except CdsiLookupResponse,
which wraps LookupResponseEntryList, which can *probably* be made
Sendable but I didn't spend time on it.
- All public Swift-defined enums except those being used purely as
namespaces.
- All zkgroup types, since they are immutable and can be serialized
and deserialized to send them anyway
- ServiceId and its subclasses, an immutable class hierarchy
- ProtocolAddress, PinHash, SenderCertificate and ServerCertificate,
and all public and private Key types, immutable wrappers around
immutable Rust objects
More of our wrapper types could be made Sendable as well if there's a
need to. See CODING_GUIDELINES for more info.
Add an annotation, CalledFromNative, and directives in the proguard file that
recognize it and prevent items it's attached to from being stripped during code
minification. Use it in place of some existing rules, and add it to methods
that were already being called from native code.