WasmEdge icon indicating copy to clipboard operation
WasmEdge copied to clipboard

WASI preview2 proposals tracking issue

Open hydai opened this issue 2 years ago • 3 comments

Summary

This issue replaced #2806.

This issue will be marked as finished once all preview2 proposals are implemented and verified.

WasmEdge would love to have native support for the WASI preview2, including the following WASI proposals:

  • [ ] WASI-IO
    • [x] WASI-POLL #3380, however, wasi-io seems not rely on this anymore
    • [ ] wasi:io/error #3753
      • [x] resource error
      • [ ] [resource-drop]error
    • [ ] wasi:io/streams #3753
      • [x] resource input-stream
        • [ ] read: func(len: u64) -> result<list<u8>, stream-error>
        • [ ] ...
        • [ ] [resource-drop]input-stream
      • [x] resource output-stream
        • [ ] ...
        • [ ] [resource-drop]output-stream
      • [x] resource error (I guess this is a legacy, now this is a variant)
        • [ ] [resource-drop]error
  • [ ] WASI-SOCKETS
  • [ ] WASI-CLOCK
    • [ ] wasi:clocks/wall-clock #3753
      • [ ] record type datetime
      • [ ] now: func() -> datetime
      • [ ] resolution: func() -> datetime
    • [ ] wasi:clocks/timezone
    • [ ] wasi:clocks/monotonic-clock
  • [ ] WASI-HTTP
  • [ ] WASI-RANDOM
  • [ ] WASI-CLI
    • [ ] wasi:cli/environment #3753
      • [ ] get-environment : func() -> list<tuple<string, string>>, todo here are
        • [ ] get environment variables as pair
        • [ ] implements Tuple<ts ...> type for ValInterface
      • [ ] get-arguments : func() -> list<string>, todo here is how to get arguments from plugin
      • [ ] initial-cwd : func() -> option<string>, todo here is complete type Option<T> for ValInterface
    • [ ] wasi:cli/exit #3753
      • [ ] exit : func(status: result)
      • [x] exit-with-code: func(status-code: u8)
    • [ ] wasi:cli/stdin #3753
      • [ ] get-stdin: func() -> input-stream
    • [ ] wasi:cli/stdout #3753
      • [ ] get-stdout: func() -> output-stream
    • [ ] wasi:cli/stderr #3753
      • [ ] get-stderr: func() -> output-stream
  • [ ] WASI-FILESYSTEM
    • [ ] wasi:filesystem/types #3753
    • [ ] wasi:filesystem/preopens #3753
  • [x] WASI-NN

Details

To ensure we can ship the preview2 proposals smoothly and are not blocked by the current plugin limitation, we will merge all proposals, except for WASI-NN, into WasmEdge Core.

The following information will be replaced by a GitHub Project Board

WASI-IO

Status: In Progress Assignee: @dannypsnl PR:

  • #2934 (conceptual, closed)
  • #3380 (done wasi-poll)
  • TBD

WASI-Sockets

Status: In Progress Assignee: @LFsWang PR: TBD

WASI-CLOCK

Status: In Progress Assignee: @dannypsnl Reference implementation: #2766 PR: TBD

WASI-HTTP

Status: Todo Assignee: TBD PR: TBD

WASI-RANDOM

Status: In Reviewing Assignee: @LFsWang PR: https://github.com/WasmEdge/WasmEdge/pull/2875

WASI-FILESYSTEM

Status: Todo. Assignee: TBD PR: TBD

WASI-NN

Status: Done. Assignee: @dm4, @hydai

Appendix

https://github.com/orgs/bytecodealliance/projects/10/views/1 https://github.com/WebAssembly/WASI/blob/main/Proposals.md https://github.com/bytecodealliance/wasmtime/tree/main/crates/wasi/src/preview2

hydai avatar Oct 03 '23 06:10 hydai

NOTE: @hydai's idea that we can use external symbols to exchange data across plugin, instead of internalize everything.

dannypsnl avatar Nov 06 '23 08:11 dannypsnl

Another board: https://github.com/orgs/bytecodealliance/projects/10/views/1?sortedBy%5Bdirection%5D=asc&sortedBy%5BcolumnId%5D=Status

dannypsnl avatar Jan 03 '24 17:01 dannypsnl