You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> spin new swiftwasm_test # uses http-swift>cd swiftwasm_test
> spin build
Building component swiftwasm-test with `swiftc -target wasm32-unknown-wasi main.swift -o main.wasm`
error: missing external dependency '/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-10-08-a.xctoolchain/usr/lib/swift/wasi/static-executable-args.lnk'
Error: Build commandfor component swiftwasm-test failed with status Exited(1)
I checked quickly on the Swiftwasm book, and found out that swiftc should not be used to build a WASM component / binary:
You may encounter this error while building with Swift SDK for WebAssembly and swiftc driver command. Unfortunately, Swift SDK does not support building with swiftc command yet, so you need to use swift build Swift Package Manager command instead.
Source: https://book.swiftwasm.org/getting-started/troubleshooting.html
So, swift build should be used here instead of swiftc.
Hi @k0pernicus, thanks for the report. We are currently planning to drop support for Swift with Spin 3.0 because of limitations in the Swift toolchain that the 2.7 template is based on.
We'd be very happy to reintroduce/keep support if a newer Swift SDK can be made to work with Spin 3.0 (i.e. the main branch, currently). I wasn't able to get it to work but I have practically zero experience with Swift so it may be possible for someone to do so already.
Thank you for your response.
I could take a look as I got more and more into Swift "these days", but I can't promise anything.
I will try to look at this in the upcoming weeks.
Only for spin with Swift (swiftwasm):
Reproduction:
I checked quickly on the Swiftwasm book, and found out that
swiftc
should not be used to build a WASM component / binary:So,
swift build
should be used here instead ofswiftc
.Version: spin 2.7.0 (a111517 2024-07-30)
Plugins:
The text was updated successfully, but these errors were encountered: