You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WASI 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?
81
+
Lee: we need standardized ways to propagate errors throughout the system which is generic over all kinds of APIs
82
+
PH: Design a way to structure and compose errors. We should do this with types, rather than integer ranges.
83
+
SBC: Capability system is one of the unifying parts of WASI, there will be errors common to all capability operations.
84
+
PCH: Compositional errors might be something like a sum type of different errors.
85
+
Bwb: Strings as errors have lots of awkward problems, including internationalization.
86
+
PCH: Being able to use any type gives us the power to describe errors.
87
+
Jplev: Have a generic error codes, with ways to map to them.
88
+
Sbc: Don’t redeclare the same errors as POSIX
89
+
Pat: APIs define the things they need now, and we’ll work on factoring things out and composition as we go forward.
90
+
Lee: POSIX is a C API and we can map WASI errors to POSIX errno as needed.
91
+
92
+
93
+
POSIX 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?
94
+
Sbc: one of our objectives is to be able to implement WASI as wasm modules.
95
+
Lee, sbc: We seem to need core language support for catching traps to really figure this out.
96
+
Evolving 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
+
```
109
+
Lee: Do we need the `-l`s? We can just put everythgin in libc.a and it’ll only get linked in
110
+
Proxy-Wasm update.
111
+
This is an update from the previous presentation in October.
112
+
Consolidated many callbacks from the previous presentationtation.
113
+
114
+
Sbc: Have you looked at creating a witx description?
115
+
Piotr: Not yet; we’re still iterating on the API.
116
+
Sbc: Do proxy implementations need to implement all callbacks, or are some of the m optional?
117
+
Piotr: Some are optional. If you’re only implementing HTTP, you only need to impelment HTTP callbacks.
118
+
PH: This proposal is great, and also very big, can we factor out pieces that can be used in other contexts?
0 commit comments