-
Notifications
You must be signed in to change notification settings - Fork 278
/
Copy pathwasi.wit
179 lines (176 loc) · 4.13 KB
/
wasi.wit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
package wasi:filesystem;
interface wasi {
enum clockid {
/// The clock measuring real time. Time value zero corresponds with
/// 1970-01-01T00:00:00Z.
realtime,
/// The store-wide monotonic clock, which is defined as a clock measuring
/// real time, whose value cannot be adjusted and which cannot have negative
/// clock jumps. The epoch of this clock is undefined. The absolute time
/// value of this clock therefore has no meaning.
monotonic,
}
/// Timestamp in nanoseconds.
type timestamp = u64;
/// Error codes returned by functions.
///
/// Not all of these error codes are returned by the functions provided by this
/// API/ some are used in higher-level library layers, and others are provided
/// merely for alignment with POSIX.
enum errno {
/// No error occurred. System call completed successfully.
success,
/// Argument list too long.
toobig,
/// Permission denied.
access,
/// Address in use.
addrinuse,
/// Address not available.
addrnotavail,
/// Address family not supported.
afnosupport,
/// Resource unavailable, or operation would block.
again,
/// Connection already in progress.
already,
/// Bad file descriptor.
badf,
/// Bad message.
badmsg,
/// Device or resource busy.
busy,
/// Operation canceled.
canceled,
/// No child processes.
child,
/// Connection aborted.
connaborted,
/// Connection refused.
connrefused,
/// Connection reset.
connreset,
/// Resource deadlock would occur.
deadlk,
/// Destination address required.
destaddrreq,
/// Mathematics argument out of domain of function.
dom,
/// Reserved.
dquot,
/// File exists.
exist,
/// Bad address.
fault,
/// File too large.
fbig,
/// Host is unreachable.
hostunreach,
/// Identifier removed.
idrm,
/// Illegal byte sequence.
ilseq,
/// Operation in progress.
inprogress,
/// Interrupted function.
intr,
/// Invalid argument.
inval,
/// I/O error.
io,
/// Socket is connected.
isconn,
/// Is a directory.
isdir,
/// Too many levels of symbolic links.
loop,
/// File descriptor value too large.
mfile,
/// Too many links.
mlink,
/// Message too large.
msgsize,
/// Reserved.
multihop,
/// Filename too long.
nametoolong,
/// Network is down.
netdown,
/// Connection aborted by network.
netreset,
/// Network unreachable.
netunreach,
/// Too many files open in system.
nfile,
/// No buffer space available.
nobufs,
/// No such device.
nodev,
/// No such file or directory.
noent,
/// Executable file format error.
noexec,
/// No locks available.
nolck,
/// Reserved.
nolink,
/// Not enough space.
nomem,
/// No message of the desired type.
nomsg,
/// Protocol not available.
noprotoopt,
/// No space left on device.
nospc,
/// Function not supported.
nosys,
/// The socket is not connected.
notconn,
/// Not a directory or a symbolic link to a directory.
notdir,
/// Directory not empty.
notempty,
/// State not recoverable.
notrecoverable,
/// Not a socket.
notsock,
/// Not supported, or operation not supported on socket.
notsup,
/// Inappropriate I/O control operation.
notty,
/// No such device or address.
nxio,
/// Value too large to be stored in data type.
overflow,
/// Previous owner died.
ownerdead,
/// Operation not permitted.
perm,
/// Broken pipe.
pipe,
/// Protocol error.
proto,
/// Protocol not supported.
protonosupport,
/// Protocol wrong type for socket.
prototype,
/// Result too large.
range,
/// Read-only file system.
rofs,
/// Invalid seek.
spipe,
/// No such process.
srch,
/// Reserved.
stale,
/// Connection timed out.
timedout,
/// Text file busy.
txtbsy,
/// Cross-device link.
xdev,
/// Extension: Capabilities insufficient.
notcapable,
}
}