Skip to content

Conversation

talaviram
Copy link

This PR adds the following improvements:

  • Adds option WEBGPU_UNIVERSAL_MAC_LIB to allow making a universal library (fat) containing x86 and arm64.
  • Adds iOS support -DCMAKE_SYSTEM_NAME=iOS
  • Adds iOS simulator support when using option WEBGPU_IOS_SIMULATOR.

Notes:

  • Most code was generated by Claude using co-pilot, but I've reviewed it and tested it prior to making the PR.
  • The reason I've ended up going with a flag to toggle simulator is due to complexity of having a single binary for simulator and device (which requires making XCFramework which isn't that straightforward). still, having the option to run simulator is useful so it was added as an option that can be used during development that uses this library.

For universal builds, the linked library should but 'fat',
containing arm64 and x86_64.
Note: iOS has two targets.
- devices (arm64)
- simulators (arm64, x86_64)

It's more complex to make a single library.
So for development if needed, there is the flag `WEBGPU_IOS_SIMULATOR`.
With this flag it will be possible to compile for simulator,
but this will fail for real devices so it's needs to be re-configured
for each task.
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