[webkit-changes] [WebKit/WebKit] 38af50: [WebGPU] Move C++ to Swift interop declarations ou...

Elliott Williams noreply at github.com
Fri Nov 15 14:52:51 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 38af50008577182013ebd31319cdaffd13ba5ee6
      https://github.com/WebKit/WebKit/commit/38af50008577182013ebd31319cdaffd13ba5ee6
  Author: Elliott Williams <emw at apple.com>
  Date:   2024-11-15 (Fri, 15 Nov 2024)

  Changed paths:
    M Source/WebGPU/Configurations/WebGPU.xcconfig
    M Source/WebGPU/WebGPU.xcodeproj/project.pbxproj
    M Source/WebGPU/WebGPU/Buffer.swift
    A Source/WebGPU/WebGPU/Internal/WebGPUSwiftInternal.h
    A Source/WebGPU/WebGPU/Internal/module.modulemap
    M Source/WebGPU/WebGPU/Queue.swift
    M Source/WebGPU/WebGPU/WebGPU.modulemap
    M Source/WebGPU/WebGPU/WebGPUSwift.h
    R Source/WebGPU/WebGPU/WebGPUSwiftInternal.h

  Log Message:
  -----------
  [WebGPU] Move C++ to Swift interop declarations out of public module
https://bugs.webkit.org/show_bug.cgi?id=283152
rdar://problem/139929679

Reviewed by Mike Wyrzykowski.

The Swift module built in WebGPU needs some special declarations in
order to compile (for example, specializations of std::span). Currently
these are declared in the public "WebGPU" module, which means that they
are public headers and are accessible to clients.

Clean this up by adding a "WebGPU_Internal" module following the recent
precedent in WebKit (https://commits.webkit.org/286465@main). This
module serves two purposes inside WebGPU: Swift code imports it to
access non-API declarations, and C++ code imports it to access Swift's
generated declarations. For now, the module exports
"WebGPUSwiftInternal.h", but other project-level headers can be added as
needed.

Move the std::span specializations to WebGPUSwiftInternal.h. Future use
of WebGPUSwift.h will be used for Swift-related declarations that
clients of WebGPU need to know about.

* Source/WebGPU/Configurations/WebGPU.xcconfig:
* Source/WebGPU/WebGPU.xcodeproj/project.pbxproj:
* Source/WebGPU/WebGPU/Buffer.swift:
* Source/WebGPU/WebGPU/Internal/WebGPUSwiftInternal.h: Renamed from Source/WebGPU/WebGPU/WebGPUSwiftInternal.h.
* Source/WebGPU/WebGPU/Queue.swift:
* Source/WebGPU/WebGPU/WebGPU.modulemap:
* Source/WebGPU/WebGPU/WebGPUSwift.h:

Canonical link: https://commits.webkit.org/286661@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list