Skip to content

Add WASI support #228

Closed
Closed
@Kyle-Ye

Description

@Kyle-Ye

Description

Current this build will fail due to some upstream blocked.

Open this issue to track the support for WASI

// ubuntu20 + swiftwasm 5.9.1 https://github.com/swiftwasm/swift
swift test --triple wasm32-unknown-wasi
<unknown>:0: warning: glibc not found for 'wasm32-unknown-wasi'; C stdlib may be unavailable
/Users/kyle/Github/swift-testing/.build/checkouts/swift-syntax/Sources/SwiftCompilerPlugin/CompilerPlugin.swift:103:19: error: cannot find 'dup' in scope
    let inputFD = dup(fileno(stdin))
                  ^~~
/Users/kyle/Github/swift-testing/.build/checkouts/swift-syntax/Sources/SwiftCompilerPlugin/CompilerPlugin.swift:117:20: error: cannot find 'dup' in scope
    let outputFD = dup(fileno(stdout))
                   ^~~
/Users/kyle/Github/swift-testing/.build/checkouts/swift-syntax/Sources/SwiftCompilerPlugin/CompilerPlugin.swift:124:11: error: cannot find 'dup2' in scope
    guard dup2(fileno(stderr), fileno(stdout)) >= 0 else {

Context

I'm maintaining some library which supports WASI. After converting to swift-testing, the WASI CI is failing. I have to disable it for now.

Priority

Low.

Before we add official WASI support in Swift Project. The priority is low here and I only open the issue for keep tracking the progress.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedExtra attention is neededwasi/wasm🧭 WebAssembly support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions