apple / swift-for-wasm-examples

Apache License 2.0
109 stars 2 forks source link

Question: Is windows support? #10

Closed felixf4xu closed 1 day ago

felixf4xu commented 4 months ago

When I see the requirements:

Requirements

  • macOS
  • Linux
  • Docker

Is Windows support for swift for wasm?

I can build this repo in Ubuntu 22, without any extra installation except for the downloading of the swift development tar file ( swift-DEVELOPMENT-SNAPSHOT-2024-04-04-a-ubuntu22.04.tar.gz)

I tried to do the similar steps on windows, but when I do:

swift build --triple wasm32-unknown-none-wasm -c release --product swift-audio

I got:

Building for production... warning: Could not read SDKSettings.json for SDK at: C:\Users\cccc\AppData\Local\Programs\Swift\Platforms\5.10.0\Windows.platform\Developer\SDKs\Windows.sdk error: emit-module command failed with exit code 1 (use -v to see invocation)

:0: error: embedded swift cannot be enabled in a compiler built without Swift sources

My swift version (on windows) is:

Swift version 6.0-dev (LLVM 87789f04c6598f1, Swift 52e8fbc115ca18f) Target: x86_64-unknown-windows-msvc

the installation file is:

swift-DEVELOPMENT-SNAPSHOT-2024-03-27-a-windows10.exe

rauhul commented 1 month ago

We're working on enabling cross compiling with embedded Swift on windows, cc @kubamracek do you think the latest nightly has all the necessary content?

MaxDesiatov commented 1 day ago

Closing as a duplicate of https://github.com/swiftlang/swift/issues/73249.