swiftwasm / swift

WebAssembly support for the Swift programming language

Home Page:https://swiftwasm.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Roadmap: WASI Preview2 Support

kateinoigakukun opened this issue · comments

The new version of WASI specification is growing and recently got stable. The new version adds HTTP system interface and it unblock us to support networking features in Wasm port of Swift.
https://github.com/WebAssembly/WASI/blob/main/preview2/README.md

Lack of native networking support was long-standing issue and it made it difficult to share code between platforms. It’s good time to mitigate the situation by leveraging the new syscall interface spec.

To Do

  • Support WASI Preview2 in wasi-libc
  • Add new target triple (wasm32-unknown-wasip2) to the apple/swift build system
  • Port network APIs in Foundation by using the new interfaces
  • Figure out how to provide wasm-component-ld executable.
    • Clang linker driver now invokes wasm-component-ld instead of wasm-ld directly... llvm/llvm-project#84569
    • Adding a new binary to the toolchain is not a realistic option for us.
    • Ask users to install it by themselves? Port the componentizing process into wasm-ld?