File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -87,3 +87,14 @@ curl -sL "https://raw.githubusercontent.com/swiftwasm/swift-sdk-index/refs/heads
8787+ swift sdk install https://github.com/swiftwasm/swift/releases/download/swift-wasm-DEVELOPMENT-SNAPSHOT-2025-01-11-a/swift-wasm-DEVELOPMENT-SNAPSHOT-2025-01-11-a-wasm32-unknown-wasi.artifactbundle.zip --checksum c9b4f4c16015d196e565105a74bf39432f8ba8139c390052b221a5c12fcaf9be
8888...
8989```
90+
91+ ### Get the id of the Swift SDK compatible with the currently selected toolchain
92+
93+ ``` console
94+ export SWIFT_SDK_ID=$(
95+ V="$(swiftc --version | head -n1)"; \
96+ TAG="$(curl -sL "https://raw.githubusercontent.com/swiftwasm/swift-sdk-index/refs/heads/main/v1/tag-by-version.json" | jq -e -r --arg v "$V" '.[$v] | .[-1]')"; \
97+ curl -sL "https://raw.githubusercontent.com/swiftwasm/swift-sdk-index/refs/heads/main/v1/builds/$TAG.json" | \
98+ jq -r '.["swift-sdks"]["wasm32-unknown-wasi"]["id"]'
99+ )
100+ ```
You can’t perform that action at this time.
0 commit comments