File tree Expand file tree Collapse file tree 4 files changed +9
-20
lines changed Expand file tree Collapse file tree 4 files changed +9
-20
lines changed Original file line number Diff line number Diff line change 10
10
uses : swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
11
11
with :
12
12
enable_embedded_wasm_sdk_build : true
13
+ wasm_exclude_swift_versions : ' [{"swift_version": "nightly-6.2"}]'
13
14
enable_linux_checks : false
14
15
enable_macos_checks : false
15
16
enable_windows_checks : false
28
29
name : Build WebGPU Demo
29
30
uses : swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
30
31
with :
31
- enable_embedded_wasm_sdk_build : true
32
32
wasm_exclude_swift_versions : ' [{"swift_version": "nightly-6.2"}]'
33
33
enable_linux_checks : false
34
34
enable_macos_checks : false
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ let package = Package(
11
11
) ,
12
12
. package (
13
13
url: " https://github.com/swiftwasm/JavaScriptKit.git " ,
14
- from : " 0.33.1 " ,
14
+ revision : " 0b785610d170a0cbb4777ea379cb7221fc82c401 " ,
15
15
) ,
16
16
] ,
17
17
targets: [
Original file line number Diff line number Diff line change 1
1
# WebGPU Example
2
2
3
- Install Swift 6.2 development snapshot and Swift SDK for Wasm by following
4
- https://www.swift.org/documentation/articles/wasm-getting-started.html .
3
+ Install Swift 6.2 (or later version) and a corresponding Swift SDK for Wasm by following
4
+ [ "Getting Started with Swift SDKs for WebAssembly" article ] ( https://www.swift.org/documentation/articles/wasm-getting-started.html ) .
5
5
6
6
Build with the installed Swift SDK using JavaScriptKit's ` PackageToJSPlugin ` plugin. Make sure to update
7
- the Swift SDK in the following command to the version that matches your installed swift.org toolchain.
7
+ the Swift SDK in the following command to the version that matches your installed Swift toolchain.
8
8
```
9
- swift package --swift-sdk swift-6.2-DEVELOPMENT-SNAPSHOT-2025-06-17-a_wasm js --use-cdn
9
+ swift package --swift-sdk swift-6.2-RELEASE_wasm js --use-cdn
10
10
```
11
11
12
- If you'd like to produce a smaller binary (under 400 kB), you'll have to use
13
- ` swift-DEVELOPMENT-SNAPSHOT-2025-08-11 ` or later development snapshot of the ` main ` Swift toolchain
14
- branch. Earlier versions (including Swift 6.2) have no support for ` async ` functions in Embedded Swift,
15
- which is required for WebGPU setup. Use the following command to build with Embedded Swift (update for
16
- your installed toolchain version if needed):
17
-
18
- ```
19
- swift package --swift-sdk swift-DEVELOPMENT-SNAPSHOT-2025-08-11-a_wasm-embedded js --use-cdn -c release
20
- ```
21
-
22
- WebGPU is enabled by default in beta and technical preview versions of Safari. Safari 17 and 18 require enabling
12
+ WebGPU is enabled by default in Safari 26. Safari 17 and 18 require enabling
23
13
WebGPU feature flag as shown on the screenshot:
24
14
25
15
<img width =" 833 " alt =" Safari Feature Flags settings tab with WebGPU enabled " src =" https://github.com/user-attachments/assets/7d0453ab-da51-4a6e-85da-dc466cf775be " />
You can’t perform that action at this time.
0 commit comments