Avatar
Avatar
Iceman
swift-foundationをSwift SDKのwasiでビルドしようとするとSwiftSyntaxのコンパイラプラグインをビルドしようとしてエラーになっちゃうんですが、これって何か回避策ありますか? ❯ swift build --target FoundationEssentials --experimental-swift-sdk 5.9.2-RELEASE-wasm Building for debugging... /Users/iceman/Downloads/swift-foundation-main/.build/checkouts/swift-syntax/Sources/SwiftCompilerPlugin/CompilerPlugin.swift:103:19: error: cannot find 'dup' in scope let inputFD = dup(fileno(stdin)) ^~~ /Users/iceman/Downloads/swift-foundation-main/.build/checkouts/swift-syntax/Sources/SwiftCompilerPlugin/CompilerPlugin.swift:117:20: error: cannot find 'dup' in scope let outputFD = dup(fileno(stdout)) ^~~ /Users/iceman/Downloads/swift-foundation-main/.build/checkouts/swift-syntax/Sources/SwiftCompilerPlugin/CompilerPlugin.swift:124:11: error: cannot find 'dup2' in scope guard dup2(fileno(stderr), fileno(stdout)) >= 0 else { ^~~~
期待しすぎるのもあれですけど,今年の GSoC のテーマにあった "Building Swift Macros with WebAssembly" は多分その辺を避けては通れないですよね. https://www.swift.org/gsoc2024/
Swift is a general-purpose programming language built using a modern approach to safety, performance, and software design patterns.