Avatar
norio_nomura 2/14/2025 2:00 AM
Homebrew Caskだとホームディレクトリ内にインストールできた。 /opt/homebrew/Library/Taps/swiftwasm/homebrew-swiftwasm/Casks/swiftwasm-sdk@6.0.rb cask "swiftwasm-sdk@6.0" do version "6.0.2" sha256 "6ffedb055cb9956395d9f435d03d53ebe9f6a8d45106b979d1b7f53358e1dcb4" release_name="swift-wasm-#{version}-RELEASE" artifactbundle_name="#{release_name}-wasm32-unknown-wasi.artifactbundle" url "https://github.com/swiftwasm/swift/releases/download/#{release_name}/#{artifactbundle_name}.zip", verified: "github.com/swiftwasm/swift/" name "SwiftWasm SDK 6.0" desc "SwiftWasm SDK 6.0" homepage "https://swiftwasm.org/" livecheck do url :url regex(/^swift-wasm-(6\.0(\.\d)?)-RELEASE$/) strategy :github_releases do |json, regex| json.map do |release| next if release["draft"] || release["prerelease"] match = release["tag_name"]&.match(regex) next if match.blank? match[1] end end end artifact artifactbundle_name.to_s, target: "~/Library/org.swift.swiftpm/swift-sdks/#{artifactbundle_name}" end を作って $ brew install swiftwasm/swiftwasm/swiftwasm-sdk@6.0 ==> Downloading https://github.com/swiftwasm/swift/releases/download/swift-wasm-6.0.2-RELEASE/swift-wasm-6.0.2-RELEASE-wasm32-unknown-wasi.artifactbundle.zip Already downloaded: /Users/norio/Library/Caches/Homebrew/downloads/c1a97efa0a5d37a905e4a4c23b259c7b45e88152ede1205129d72520f0f340a3--swift-wasm-6.0.2-RELEASE-wasm32-unknown-wasi.artifactbundle.zip ==> Installing Cask swiftwasm-sdk@6.0 ==> Moving Generic Artifact 'swift-wasm-6.0.2-RELEASE-wasm32-unknown-wasi.artifactbundle' to '/Users/norio/Library/org.swift.swiftpm/swift-sdks/swift-wasm-6.0.2-RELEASE-wasm32-unknown-wasi.artifactbundle' 🍺 swiftwasm-sdk@6.0 was successfully installed! $ swift sdk list 6.0.2-RELEASE-wasm32-unknown-wasi macOS限定になるけど、シンボリックリンクとか不要。 livecheckなどを追記 (edited)