Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sendable annotation to Crypto Extras #208

Open
0xTim opened this issue Nov 6, 2023 · 2 comments
Open

Add Sendable annotation to Crypto Extras #208

0xTim opened this issue Nov 6, 2023 · 2 comments

Comments

@0xTim
Copy link
Contributor

0xTim commented Nov 6, 2023

New API Proposal: Sendable Support

Motivation:

Use Swift Crypto types in concurrency contexts invariably starts to hit issues as no types are Sendable. I'm aware there are issues around the main Crypto target as that has match CryptoKit (or does it? Could we add Sendable conformance on Linux?) but it would be great to add it to the types in Crypto Extras

Importance:

It's possible to achieve this with a mix of @preconcurrency and @unchecked Sendable but neither of these are ideal for obvious reasons.

@Lukasa
Copy link
Collaborator

Lukasa commented Nov 6, 2023

Yes, the goal is that the Crypto API exactly matches the CryptoKit one. This avoids users needing to deal with platform-specific imports or other logic.

For CryptoExtras, this can definitely be done separately. @rnro want to take a look at CryptoExtras?

@rnro
Copy link
Contributor

rnro commented Nov 6, 2023

Yep, sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants