1![WASI logo](/WASI.png)
2
3## Agenda for the March 26 video call of WASI Subgroup
4
5- **Where**: zoom.us
6- **When**: March 26, 16:00-17:00 UTC
7- **Location**: *link on calendar invite*
8- **Contact**:
9    - Name: Dan Gohman
10    - Email: sunfish@mozilla.com
11
12### Registration
13
14None required if you've attended before. Email Dan Gohman to sign up if it's
15your first time. The meeting is open to CG members only.
16
17## Logistics
18
19The meeting will be on a zoom.us video conference.
20Installation is required, see the calendar invite.
21
22## Agenda items
23
241. Opening, welcome and roll call
25    1. Please help add your name to the meeting notes.
26    1. Please help take notes.
27    1. Thanks!
281. Proposals and discussions
29    1. WASI currently uses a POSIX-like `errno` enum, but that seems
30       not well suited for less POSIX-like APIs:
31       https://github.com/WebAssembly/WASI-crypto/pull/13#issuecomment-599324384
32       Many systems have evolved to having a single error enum shared
33       across the whole system. Is it ok if we don't aim for that?
34    1. POSIX tries hard not to let syscalls cause segfaults, returning
35       things like `EFAULT` instead. There may be some value in this for
36       POSIX compatibility, but how valuable is this otherwise? Should
37       other WASI APIs be allowed to trap?
38    1. Evolving idea: wasi-sdk API for extra emulation:
39       1. `-D_WASILIBC_EMULATED_MMAN`
40       1. `-D_WASILIBC_EMULATED_PAUSE`
41       1. `-D_WASILIBC_EMULATED_RAISE`
42       1. ...
43       1. `-D_WASILIBC_EMULATED_ALL` ?
44       and
45       1. `-lwasi-emulated-mman`
46       1. `-lwasi-emulated-pause`
47       1. `-lwasi-emulated-raise`
48       1. ...
49       1. `-lwasi-emulated-all` ?
50    1. [Proxy-Wasm](https://github.com/proxy-wasm) update.
51
52## Meeting Notes
53
54Attendees:
55
56Dan Gohman
57Jan Falkin
58Lee Campbell
59Till Schneidereit
60Alex Crichton
61Andrew Brown
62Mingqiu Sun
63Olaf Tomalka
64Piotr Sikora
65Pat Hickey
66Peter Huene
67Sam Clegg
68Johnnie Birch
69Wouter van Oortmerssen
70Luke Wagner
71Aaron Turner
72Benjamin Brittain
73Taylor Thomas
74John Plevyak
75Ralph Squillace
76Brian Hardock
77
78Meeting notes:
79
80WASI currently uses a POSIX-like errno enum, but that seems not well suited for less POSIX-like APIs: https://github.com/WebAssembly/WASI-crypto/pull/13#issuecomment-599324384 Many systems have evolved to having a single error enum shared across the whole system. Is it ok if we don't aim for that?
81Lee: we need standardized ways to propagate errors throughout the system which is generic over all kinds of APIs
82PH: Design a way to structure and compose errors. We should do this with types, rather than integer ranges.
83SBC: Capability system is one of the unifying parts of WASI, there will be errors common to all capability operations.
84PCH: Compositional errors might be something like a sum type of different errors.
85Bwb: Strings as errors have lots of awkward problems, including internationalization.
86PCH: Being able to use any type gives us the power to describe errors.
87Jplev: Have a generic error codes, with ways to map to them.
88Sbc: Don’t redeclare the same errors as POSIX
89Pat: APIs define the things they need now, and we’ll work on factoring things out and composition as we go forward.
90Lee: POSIX is a C API and we can map WASI errors to POSIX errno as needed.
91
92
93POSIX tries hard not to let syscalls cause segfaults, returning things like EFAULT instead. There may be some value in this for POSIX compatibility, but how valuable is this otherwise? Should other WASI APIs be allowed to trap?
94Sbc: one of our objectives is to be able to implement WASI as wasm modules.
95Lee, sbc: We seem to need core language support for catching traps to really figure this out.
96Evolving idea: wasi-sdk API for extra emulation:
97```
98-D_WASILIBC_EMULATED_MMAN
99-D_WASILIBC_EMULATED_PAUSE
100-D_WASILIBC_EMULATED_RAISE
101...
102-D_WASILIBC_EMULATED_ALL ? and
103-lwasi-emulated-mman
104-lwasi-emulated-pause
105-lwasi-emulated-raise
106...
107-lwasi-emulated-all ?
108```
109Lee: Do we need the `-l`s? We can just put everythgin in libc.a and it’ll only get linked in
110Proxy-Wasm update.
111This is an update from the previous presentation in October.
112Consolidated many callbacks from the previous presentationtation.
113
114Sbc: Have you looked at creating a witx description?
115Piotr: Not yet; we’re still iterating on the API.
116Sbc: Do proxy implementations need to implement all callbacks, or are some of the m optional?
117Piotr: Some are optional. If you’re only implementing HTTP, you only need to impelment HTTP callbacks.
118PH: This proposal is great, and also very big, can we factor out pieces that can be used in other contexts?
119
120Adapting the core CG Phases for WASI.
121https://github.com/WebAssembly/proposals/
122“Two or more Web VMs”
123
124Reference interpreter, formal semantics
125
126Fitting the existing phases into the process
127