Skip to content

feat: Initial implementation of many GCD API's using Swift Concurrency #1

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

Open
wants to merge 38 commits into
base: main
Choose a base branch
from

Conversation

scottmarchant
Copy link
Collaborator

@scottmarchant scottmarchant commented Jun 27, 2025

Summary

Initial implementation of common GCD API's using Swift Concurrency. The goal of this implementation is to enable wasm compilation for many repositories that currently use GCD.

Note this is a critical part of larger effort to compile several open source Swift repositories to wasm

Details

DispatchAsync is a temporary experimental repository aimed at implementing missing Dispatch support in the SwiftWasm toolchain.
Currently, SwiftWasm doesn't include Dispatch.
But, SwiftWasm does support Swift Concurrency. DispatchAsync implements a number of common Dispatch API's using Swift Concurrency under the hood.

Refer to the README updates in this PR for more details.

@scottmarchant scottmarchant marked this pull request as draft June 27, 2025 20:28
@scottmarchant scottmarchant marked this pull request as ready for review June 30, 2025 18:48
@@ -0,0 +1,42 @@
name: Pull request
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note, I plan to add much more extensive testing in my next PR for this repo coming the in the next week or two. I did add some basic tests just for sanity, though.

I've also tested this manually in consumption from several different repositories, and in the browser runtime in a wasm build.

It works.

# dispatch-async
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would probably be a good idea to read this readme first, before reviewing the rest of the code in this PR. I explain a bit here.

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

Successfully merging this pull request may close these issues.

1 participant