swiftwasm / swift

WebAssembly support for the Swift programming language
https://swiftwasm.org
1.28k stars 28 forks source link

SwiftWasm 5.9 release #5554

Closed kateinoigakukun closed 5 months ago

kateinoigakukun commented 8 months ago

TODO:

gh workflow run manual-distribution.yml -f run-id=$RC_RUN_ID -f scheme=release-5.9 -f override-name=swift-wasm-5.9.1-RELEASE -f display-name="Swift for WebAssembly 5.9.1 Release $(date +'%Y-%m-%d')" -f display-name-short="Swift for WebAssembly 5.9.1 Release" -R swiftwasm/swift

(Replace $RC_RUN_ID with the GitHub Actions run id for the release candidate build)

After tagging the toolchain version

Current blockers

Please report any other issues found in the latest release snapshots to help us prioritize them.

References

kateinoigakukun commented 5 months ago

Rebuilding toolchain since the arm64-darwin toolchain in the release candidate contained unexpected linkage reference to libzstd installed via homebrew. The build job is running at https://github.com/swiftwasm/swiftwasm-build/actions/runs/7532149900/job/20502246203

kateinoigakukun commented 5 months ago

SwiftWasm 5.9.1 released! https://blog.swiftwasm.org/posts/5-9-released

See https://book.swiftwasm.org/getting-started/setup.html for each download link

kateinoigakukun commented 5 months ago

We started distributing Swift SDK artifactbundles: https://github.com/swiftwasm/swiftwasm-build/pull/180

You can install WebAssembly SDK by following commands with Swift 5.9 installed:

$ swift experimental-sdk install https://github.com/swiftwasm/swift/releases/download/swift-wasm-DEVELOPMENT-SNAPSHOT-2024-01-26-a/swift-wasm-DEVELOPMENT-SNAPSHOT-2024-01-26-a-ubuntu20.04_x86_64.artifactbundle.zip
$ swift package init --type executable --name Example
$ swift build --experimental-swift-sdk wasm32-unknown-wasi
$ wasmtime .build/debug/Example.wasm

The initial artifact release is a little bit fat, but https://github.com/apple/swift-sdk-generator/pull/80 will mitigate it.

kkebo commented 5 months ago

Thank you for sharing the information.

For installing from GitHub, the --checksum option is required. However, I didn't find checksums because GitHub doesn't show them on the download page.

$ swift experimental-sdk install https://github.com/swiftwasm/swift/releases/download/swift-wasm-DEVELOPMENT-SNAPSHOT-2024-01-26-a/swift-wasm-DEVELOPMENT-SNAPSHOT-2024-01-26-a-ubuntu20.04_x86_64.artifactbundle.zip
Error: downloadError("Error Domain=NSURLErrorDomain Code=-1001 \"(null)\"")

So I had to download it once and then install it.

$ curl -LO https://github.com/swiftwasm/swift/releases/download/swift-wasm-DEVELOPMENT-SNAPSHOT-2024-01-26-a/swift-wasm-DEVELOPMENT-SNAPSHOT-2024-01-26-a-ubuntu20.04_x86_64.artifactbundle.zip
$ swift experimental-sdk install swift-wasm-DEVELOPMENT-SNAPSHOT-2024-01-26-a-ubuntu20.04_x86_64.artifactbundle.zip
swift-wasm-DEVELOPMENT-SNAPSHOT-2024-01-26-a-ubuntu20.04_x86_64.artifactbundle.zip is assumed to be an archive, unpacking...
Swift SDK bundle at `swift-wasm-DEVELOPMENT-SNAPSHOT-2024-01-26-a-ubuntu20.04_x86_64.artifactbundle.zip` successfully installed.
kateinoigakukun commented 5 months ago

@kkk669 Which host swift version are you using?

kkebo commented 5 months ago

@kateinoigakukun I'm using Swift 5.9.2 on Linux aarch64, so I actually installed https://github.com/swiftwasm/swift/releases/download/swift-wasm-5.9-SNAPSHOT-2024-01-28-a/swift-wasm-5.9-SNAPSHOT-2024-01-28-a-ubuntu20.04_aarch64.artifactbundle.zip. Also, I tried Swift main snapshot.

The requirement of --checksum is not host-dependent. According to the Swift Evolution proposal, it's generally required.

For Swift SDKs installed from remote URLs an additional --checksum option is required, through which users of a Swift SDK can specify a checksum provided by a publisher of the SDK.

kateinoigakukun commented 5 months ago

@kkk669 Actually the checksum verification feature is not even implemented yet in SwiftPM. So I suspect there should be a different problem here. Would you mind trying it again after uninstalling the SDK. I guess there might be internet connection issue?

kkebo commented 5 months ago

@kateinoigakukun I see. Sorry for my misleading information.

kkebo commented 4 months ago

I guess there might be internet connection issue?

By the way, it turned out that downloadError("Error Domain=NSURLErrorDomain Code=-1001 \"(null)\"") was caused by swiftly. It was a symbolic link issue as well as this one. And it also seems to happen when downloading an artifact bundle.

kateinoigakukun commented 3 months ago

Started release workflow for 5.9.2 https://github.com/swiftwasm/swift/actions/runs/8219885666

gh workflow run manual-distribution.yml -f run-id=8215949707 -f scheme=release-5.9 -f override-name=swift-wasm-5.9.2-RELEASE -f display-name="Swift for WebAssembly 5.9.2 Release $(date +'%Y-%m-%d')" -f display-name-short="Swift for WebAssembly 5.9.2 Release" -R swiftwasm/swift
kateinoigakukun commented 3 months ago

Published 5.9.2 with SwiftPM command plugin fix and Swift SDK support. https://github.com/swiftwasm/swift/releases/tag/swift-wasm-5.9.2-RELEASE