@@ -15,38 +15,38 @@ use core::mem::MaybeUninit;
15
15
use raw:: * ;
16
16
17
17
pub type Advice = __wasi_advice_t ;
18
- pub type Clockid = __wasi_clockid_t ;
18
+ pub type ClockId = __wasi_clockid_t ;
19
19
pub type Device = __wasi_device_t ;
20
- pub type Dircookie = __wasi_dircookie_t ;
20
+ pub type DirCookie = __wasi_dircookie_t ;
21
21
pub type Errno = __wasi_errno_t ;
22
- pub type Eventrwflags = __wasi_eventrwflags_t ;
23
- pub type Eventtype = __wasi_eventtype_t ;
24
- pub type Exitcode = __wasi_exitcode_t ;
22
+ pub type EventRwFlags = __wasi_eventrwflags_t ;
23
+ pub type EventType = __wasi_eventtype_t ;
24
+ pub type ExitCode = __wasi_exitcode_t ;
25
25
pub type Fd = __wasi_fd_t ;
26
- pub type Fdflags = __wasi_fdflags_t ;
27
- pub type Filedelta = __wasi_filedelta_t ;
28
- pub type Filesize = __wasi_filesize_t ;
29
- pub type Filetype = __wasi_filetype_t ;
30
- pub type Fstflags = __wasi_fstflags_t ;
26
+ pub type FdFlags = __wasi_fdflags_t ;
27
+ pub type FileDelta = __wasi_filedelta_t ;
28
+ pub type FileSize = __wasi_filesize_t ;
29
+ pub type FileType = __wasi_filetype_t ;
30
+ pub type FstFlags = __wasi_fstflags_t ;
31
31
pub type Inode = __wasi_inode_t ;
32
32
pub type Linkcount = __wasi_linkcount_t ;
33
- pub type Lookupflags = __wasi_lookupflags_t ;
34
- pub type Oflags = __wasi_oflags_t ;
35
- pub type Preopentype = __wasi_preopentype_t ;
36
- pub type Riflags = __wasi_riflags_t ;
33
+ pub type LookupFlags = __wasi_lookupflags_t ;
34
+ pub type OFlags = __wasi_oflags_t ;
35
+ pub type PreopenType = __wasi_preopentype_t ;
36
+ pub type RiFlags = __wasi_riflags_t ;
37
37
pub type Rights = __wasi_rights_t ;
38
- pub type Roflags = __wasi_roflags_t ;
39
- pub type Sdflags = __wasi_sdflags_t ;
40
- pub type Siflags = __wasi_siflags_t ;
38
+ pub type RoFlags = __wasi_roflags_t ;
39
+ pub type SdFlags = __wasi_sdflags_t ;
40
+ pub type SiFlags = __wasi_siflags_t ;
41
41
pub type Signal = __wasi_signal_t ;
42
- pub type Subclockflags = __wasi_subclockflags_t ;
42
+ pub type SubclockFlags = __wasi_subclockflags_t ;
43
43
pub type Timestamp = __wasi_timestamp_t ;
44
44
pub type Userdata = __wasi_userdata_t ;
45
45
pub type Whence = __wasi_whence_t ;
46
46
pub type Dirent = __wasi_dirent_t ;
47
- pub type Fdstat = __wasi_fdstat_t ;
48
- pub type Filestat = __wasi_filestat_t ;
49
- pub type Ciovec = __wasi_ciovec_t ;
47
+ pub type FdStat = __wasi_fdstat_t ;
48
+ pub type FileStat = __wasi_filestat_t ;
49
+ pub type CIovec = __wasi_ciovec_t ;
50
50
pub type Iovec = __wasi_iovec_t ;
51
51
pub type Subscription = __wasi_subscription_t ;
52
52
pub type Event = __wasi_event_t ;
@@ -58,11 +58,11 @@ pub const ADVICE_RANDOM: Advice = __WASI_ADVICE_RANDOM;
58
58
pub const ADVICE_WILLNEED : Advice = __WASI_ADVICE_WILLNEED;
59
59
pub const ADVICE_DONTNEED : Advice = __WASI_ADVICE_DONTNEED;
60
60
pub const ADVICE_NOREUSE : Advice = __WASI_ADVICE_NOREUSE;
61
- pub const CLOCK_REALTIME : Clockid = __WASI_CLOCK_REALTIME;
62
- pub const CLOCK_MONOTONIC : Clockid = __WASI_CLOCK_MONOTONIC;
63
- pub const CLOCK_PROCESS_CPUTIME_ID : Clockid = __WASI_CLOCK_PROCESS_CPUTIME_ID;
64
- pub const CLOCK_THREAD_CPUTIME_ID : Clockid = __WASI_CLOCK_THREAD_CPUTIME_ID;
65
- pub const DIRCOOKIE_START : Dircookie = __WASI_DIRCOOKIE_START;
61
+ pub const CLOCK_REALTIME : ClockId = __WASI_CLOCK_REALTIME;
62
+ pub const CLOCK_MONOTONIC : ClockId = __WASI_CLOCK_MONOTONIC;
63
+ pub const CLOCK_PROCESS_CPUTIME_ID : ClockId = __WASI_CLOCK_PROCESS_CPUTIME_ID;
64
+ pub const CLOCK_THREAD_CPUTIME_ID : ClockId = __WASI_CLOCK_THREAD_CPUTIME_ID;
65
+ pub const DIRCOOKIE_START : DirCookie = __WASI_DIRCOOKIE_START;
66
66
pub const ESUCCESS : Errno = __WASI_ESUCCESS;
67
67
pub const E2BIG : Errno = __WASI_E2BIG;
68
68
pub const EACCES : Errno = __WASI_EACCES;
@@ -140,35 +140,35 @@ pub const ETIMEDOUT: Errno = __WASI_ETIMEDOUT;
140
140
pub const ETXTBSY : Errno = __WASI_ETXTBSY;
141
141
pub const EXDEV : Errno = __WASI_EXDEV;
142
142
pub const ENOTCAPABLE : Errno = __WASI_ENOTCAPABLE;
143
- pub const EVENT_FD_READWRITE_HANGUP : Eventrwflags = __WASI_EVENT_FD_READWRITE_HANGUP;
144
- pub const EVENTTYPE_CLOCK : Eventtype = __WASI_EVENTTYPE_CLOCK;
145
- pub const EVENTTYPE_FD_READ : Eventtype = __WASI_EVENTTYPE_FD_READ;
146
- pub const EVENTTYPE_FD_WRITE : Eventtype = __WASI_EVENTTYPE_FD_WRITE;
147
- pub const FDFLAG_APPEND : Fdflags = __WASI_FDFLAG_APPEND;
148
- pub const FDFLAG_DSYNC : Fdflags = __WASI_FDFLAG_DSYNC;
149
- pub const FDFLAG_NONBLOCK : Fdflags = __WASI_FDFLAG_NONBLOCK;
150
- pub const FDFLAG_RSYNC : Fdflags = __WASI_FDFLAG_RSYNC;
151
- pub const FDFLAG_SYNC : Fdflags = __WASI_FDFLAG_SYNC;
152
- pub const FILETYPE_UNKNOWN : Filetype = __WASI_FILETYPE_UNKNOWN;
153
- pub const FILETYPE_BLOCK_DEVICE : Filetype = __WASI_FILETYPE_BLOCK_DEVICE;
154
- pub const FILETYPE_CHARACTER_DEVICE : Filetype = __WASI_FILETYPE_CHARACTER_DEVICE;
155
- pub const FILETYPE_DIRECTORY : Filetype = __WASI_FILETYPE_DIRECTORY;
156
- pub const FILETYPE_REGULAR_FILE : Filetype = __WASI_FILETYPE_REGULAR_FILE;
157
- pub const FILETYPE_SOCKET_DGRAM : Filetype = __WASI_FILETYPE_SOCKET_DGRAM;
158
- pub const FILETYPE_SOCKET_STREAM : Filetype = __WASI_FILETYPE_SOCKET_STREAM;
159
- pub const FILETYPE_SYMBOLIC_LINK : Filetype = __WASI_FILETYPE_SYMBOLIC_LINK;
160
- pub const FILESTAT_SET_ATIM : Fstflags = __WASI_FILESTAT_SET_ATIM;
161
- pub const FILESTAT_SET_ATIM_NOW : Fstflags = __WASI_FILESTAT_SET_ATIM_NOW;
162
- pub const FILESTAT_SET_MTIM : Fstflags = __WASI_FILESTAT_SET_MTIM;
163
- pub const FILESTAT_SET_MTIM_NOW : Fstflags = __WASI_FILESTAT_SET_MTIM_NOW;
164
- pub const LOOKUP_SYMLINK_FOLLOW : Lookupflags = __WASI_LOOKUP_SYMLINK_FOLLOW;
165
- pub const O_CREAT : Oflags = __WASI_O_CREAT;
166
- pub const O_DIRECTORY : Oflags = __WASI_O_DIRECTORY;
167
- pub const O_EXCL : Oflags = __WASI_O_EXCL;
168
- pub const O_TRUNC : Oflags = __WASI_O_TRUNC;
169
- pub const PREOPENTYPE_DIR : Preopentype = __WASI_PREOPENTYPE_DIR;
170
- pub const SOCK_RECV_PEEK : Riflags = __WASI_SOCK_RECV_PEEK;
171
- pub const SOCK_RECV_WAITALL : Riflags = __WASI_SOCK_RECV_WAITALL;
143
+ pub const EVENT_FD_READWRITE_HANGUP : EventRwFlags = __WASI_EVENT_FD_READWRITE_HANGUP;
144
+ pub const EVENTTYPE_CLOCK : EventType = __WASI_EVENTTYPE_CLOCK;
145
+ pub const EVENTTYPE_FD_READ : EventType = __WASI_EVENTTYPE_FD_READ;
146
+ pub const EVENTTYPE_FD_WRITE : EventType = __WASI_EVENTTYPE_FD_WRITE;
147
+ pub const FDFLAG_APPEND : FdFlags = __WASI_FDFLAG_APPEND;
148
+ pub const FDFLAG_DSYNC : FdFlags = __WASI_FDFLAG_DSYNC;
149
+ pub const FDFLAG_NONBLOCK : FdFlags = __WASI_FDFLAG_NONBLOCK;
150
+ pub const FDFLAG_RSYNC : FdFlags = __WASI_FDFLAG_RSYNC;
151
+ pub const FDFLAG_SYNC : FdFlags = __WASI_FDFLAG_SYNC;
152
+ pub const FILETYPE_UNKNOWN : FileType = __WASI_FILETYPE_UNKNOWN;
153
+ pub const FILETYPE_BLOCK_DEVICE : FileType = __WASI_FILETYPE_BLOCK_DEVICE;
154
+ pub const FILETYPE_CHARACTER_DEVICE : FileType = __WASI_FILETYPE_CHARACTER_DEVICE;
155
+ pub const FILETYPE_DIRECTORY : FileType = __WASI_FILETYPE_DIRECTORY;
156
+ pub const FILETYPE_REGULAR_FILE : FileType = __WASI_FILETYPE_REGULAR_FILE;
157
+ pub const FILETYPE_SOCKET_DGRAM : FileType = __WASI_FILETYPE_SOCKET_DGRAM;
158
+ pub const FILETYPE_SOCKET_STREAM : FileType = __WASI_FILETYPE_SOCKET_STREAM;
159
+ pub const FILETYPE_SYMBOLIC_LINK : FileType = __WASI_FILETYPE_SYMBOLIC_LINK;
160
+ pub const FILESTAT_SET_ATIM : FstFlags = __WASI_FILESTAT_SET_ATIM;
161
+ pub const FILESTAT_SET_ATIM_NOW : FstFlags = __WASI_FILESTAT_SET_ATIM_NOW;
162
+ pub const FILESTAT_SET_MTIM : FstFlags = __WASI_FILESTAT_SET_MTIM;
163
+ pub const FILESTAT_SET_MTIM_NOW : FstFlags = __WASI_FILESTAT_SET_MTIM_NOW;
164
+ pub const LOOKUP_SYMLINK_FOLLOW : LookupFlags = __WASI_LOOKUP_SYMLINK_FOLLOW;
165
+ pub const O_CREAT : OFlags = __WASI_O_CREAT;
166
+ pub const O_DIRECTORY : OFlags = __WASI_O_DIRECTORY;
167
+ pub const O_EXCL : OFlags = __WASI_O_EXCL;
168
+ pub const O_TRUNC : OFlags = __WASI_O_TRUNC;
169
+ pub const PREOPENTYPE_DIR : PreopenType = __WASI_PREOPENTYPE_DIR;
170
+ pub const SOCK_RECV_PEEK : RiFlags = __WASI_SOCK_RECV_PEEK;
171
+ pub const SOCK_RECV_WAITALL : RiFlags = __WASI_SOCK_RECV_WAITALL;
172
172
pub const RIGHT_FD_DATASYNC : Rights = __WASI_RIGHT_FD_DATASYNC;
173
173
pub const RIGHT_FD_READ : Rights = __WASI_RIGHT_FD_READ;
174
174
pub const RIGHT_FD_SEEK : Rights = __WASI_RIGHT_FD_SEEK;
@@ -198,9 +198,9 @@ pub const RIGHT_PATH_REMOVE_DIRECTORY: Rights = __WASI_RIGHT_PATH_REMOVE_DIRECTO
198
198
pub const RIGHT_PATH_UNLINK_FILE : Rights = __WASI_RIGHT_PATH_UNLINK_FILE;
199
199
pub const RIGHT_POLL_FD_READWRITE : Rights = __WASI_RIGHT_POLL_FD_READWRITE;
200
200
pub const RIGHT_SOCK_SHUTDOWN : Rights = __WASI_RIGHT_SOCK_SHUTDOWN;
201
- pub const SOCK_RECV_DATA_TRUNCATED : Roflags = __WASI_SOCK_RECV_DATA_TRUNCATED;
202
- pub const SHUT_RD : Sdflags = __WASI_SHUT_RD;
203
- pub const SHUT_WR : Sdflags = __WASI_SHUT_WR;
201
+ pub const SOCK_RECV_DATA_TRUNCATED : RoFlags = __WASI_SOCK_RECV_DATA_TRUNCATED;
202
+ pub const SHUT_RD : SdFlags = __WASI_SHUT_RD;
203
+ pub const SHUT_WR : SdFlags = __WASI_SHUT_WR;
204
204
pub const SIGHUP : Signal = __WASI_SIGHUP;
205
205
pub const SIGINT : Signal = __WASI_SIGINT;
206
206
pub const SIGQUIT : Signal = __WASI_SIGQUIT;
@@ -231,12 +231,12 @@ pub const SIGWINCH: Signal = __WASI_SIGWINCH;
231
231
pub const SIGPOLL : Signal = __WASI_SIGPOLL;
232
232
pub const SIGPWR : Signal = __WASI_SIGPWR;
233
233
pub const SIGSYS : Signal = __WASI_SIGSYS;
234
- pub const SUBSCRIPTION_CLOCK_ABSTIME : Subclockflags = __WASI_SUBSCRIPTION_CLOCK_ABSTIME;
234
+ pub const SUBSCRIPTION_CLOCK_ABSTIME : SubclockFlags = __WASI_SUBSCRIPTION_CLOCK_ABSTIME;
235
235
pub const WHENCE_CUR : Whence = __WASI_WHENCE_CUR;
236
236
pub const WHENCE_END : Whence = __WASI_WHENCE_END;
237
237
pub const WHENCE_SET : Whence = __WASI_WHENCE_SET;
238
238
239
- pub fn clock_res_get ( clock_id : Clockid ) -> ( Errno , Timestamp ) {
239
+ pub fn clock_res_get ( clock_id : ClockId ) -> ( Errno , Timestamp ) {
240
240
let mut resolution = MaybeUninit :: < Timestamp > :: uninit ( ) ;
241
241
unsafe {
242
242
(
@@ -246,7 +246,7 @@ pub fn clock_res_get(clock_id: Clockid) -> (Errno, Timestamp) {
246
246
}
247
247
}
248
248
249
- pub fn clock_time_get ( clock_id : Clockid , precision : Timestamp ) -> ( Errno , Timestamp ) {
249
+ pub fn clock_time_get ( clock_id : ClockId , precision : Timestamp ) -> ( Errno , Timestamp ) {
250
250
let mut time = MaybeUninit :: < Timestamp > :: uninit ( ) ;
251
251
unsafe {
252
252
(
@@ -256,7 +256,7 @@ pub fn clock_time_get(clock_id: Clockid, precision: Timestamp) -> (Errno, Timest
256
256
}
257
257
}
258
258
259
- pub fn fd_pread ( fd : Fd , iovs : & [ Iovec ] , offset : Filesize ) -> ( Errno , usize ) {
259
+ pub fn fd_pread ( fd : Fd , iovs : & [ Iovec ] , offset : FileSize ) -> ( Errno , usize ) {
260
260
let mut nread = MaybeUninit :: < usize > :: uninit ( ) ;
261
261
unsafe {
262
262
(
@@ -266,7 +266,7 @@ pub fn fd_pread(fd: Fd, iovs: &[Iovec], offset: Filesize) -> (Errno, usize) {
266
266
}
267
267
}
268
268
269
- pub fn fd_pwrite ( fd : Fd , iovs : & [ Ciovec ] , offset : Filesize ) -> ( Errno , usize ) {
269
+ pub fn fd_pwrite ( fd : Fd , iovs : & [ CIovec ] , offset : FileSize ) -> ( Errno , usize ) {
270
270
let mut nwritten = MaybeUninit :: < usize > :: uninit ( ) ;
271
271
unsafe {
272
272
(
@@ -302,8 +302,8 @@ pub fn fd_renumber(from: Fd, to: Fd) -> Errno {
302
302
unsafe { __wasi_fd_renumber ( from, to) }
303
303
}
304
304
305
- pub fn fd_seek ( fd : Fd , offset : Filedelta , whence : Whence ) -> ( Errno , Filesize ) {
306
- let mut newoffset = MaybeUninit :: < Filesize > :: uninit ( ) ;
305
+ pub fn fd_seek ( fd : Fd , offset : FileDelta , whence : Whence ) -> ( Errno , FileSize ) {
306
+ let mut newoffset = MaybeUninit :: < FileSize > :: uninit ( ) ;
307
307
unsafe {
308
308
(
309
309
__wasi_fd_seek ( fd, offset, whence, newoffset. as_mut_ptr ( ) ) ,
@@ -312,8 +312,8 @@ pub fn fd_seek(fd: Fd, offset: Filedelta, whence: Whence) -> (Errno, Filesize) {
312
312
}
313
313
}
314
314
315
- pub fn fd_tell ( fd : Fd ) -> ( Errno , Filesize ) {
316
- let mut newoffset = MaybeUninit :: < Filesize > :: uninit ( ) ;
315
+ pub fn fd_tell ( fd : Fd ) -> ( Errno , FileSize ) {
316
+ let mut newoffset = MaybeUninit :: < FileSize > :: uninit ( ) ;
317
317
unsafe {
318
318
(
319
319
__wasi_fd_tell ( fd, newoffset. as_mut_ptr ( ) ) ,
@@ -322,8 +322,8 @@ pub fn fd_tell(fd: Fd) -> (Errno, Filesize) {
322
322
}
323
323
}
324
324
325
- pub fn fd_fdstat_get ( fd : Fd ) -> ( Errno , Fdstat ) {
326
- let mut buf = MaybeUninit :: < Fdstat > :: uninit ( ) ;
325
+ pub fn fd_fdstat_get ( fd : Fd ) -> ( Errno , FdStat ) {
326
+ let mut buf = MaybeUninit :: < FdStat > :: uninit ( ) ;
327
327
unsafe {
328
328
(
329
329
__wasi_fd_fdstat_get ( fd, buf. as_mut_ptr ( ) ) ,
@@ -332,7 +332,7 @@ pub fn fd_fdstat_get(fd: Fd) -> (Errno, Fdstat) {
332
332
}
333
333
}
334
334
335
- pub fn fd_fdstat_set_flags ( fd : Fd , flags : Fdflags ) -> Errno {
335
+ pub fn fd_fdstat_set_flags ( fd : Fd , flags : FdFlags ) -> Errno {
336
336
unsafe { __wasi_fd_fdstat_set_flags ( fd, flags) }
337
337
}
338
338
@@ -344,7 +344,7 @@ pub fn fd_sync(fd: Fd) -> Errno {
344
344
unsafe { __wasi_fd_sync ( fd) }
345
345
}
346
346
347
- pub fn fd_write ( fd : Fd , iovs : & [ Ciovec ] ) -> ( Errno , usize ) {
347
+ pub fn fd_write ( fd : Fd , iovs : & [ CIovec ] ) -> ( Errno , usize ) {
348
348
let mut nwritten = MaybeUninit :: < usize > :: uninit ( ) ;
349
349
unsafe {
350
350
(
@@ -354,11 +354,11 @@ pub fn fd_write(fd: Fd, iovs: &[Ciovec]) -> (Errno, usize) {
354
354
}
355
355
}
356
356
357
- pub fn fd_advise ( fd : Fd , offset : Filesize , len : Filesize , advice : Advice ) -> Errno {
357
+ pub fn fd_advise ( fd : Fd , offset : FileSize , len : FileSize , advice : Advice ) -> Errno {
358
358
unsafe { __wasi_fd_advise ( fd, offset, len, advice) }
359
359
}
360
360
361
- pub fn fd_allocate ( fd : Fd , offset : Filesize , len : Filesize ) -> Errno {
361
+ pub fn fd_allocate ( fd : Fd , offset : FileSize , len : FileSize ) -> Errno {
362
362
unsafe { __wasi_fd_allocate ( fd, offset, len) }
363
363
}
364
364
@@ -368,7 +368,7 @@ pub fn path_create_directory(fd: Fd, path: &[u8]) -> Errno {
368
368
369
369
pub fn path_link (
370
370
old_fd : Fd ,
371
- old_flags : Lookupflags ,
371
+ old_flags : LookupFlags ,
372
372
old_path : & [ u8 ] ,
373
373
new_fd : Fd ,
374
374
new_path : & [ u8 ] ,
@@ -388,12 +388,12 @@ pub fn path_link(
388
388
389
389
pub fn path_open (
390
390
dirfd : Fd ,
391
- dirflags : Lookupflags ,
391
+ dirflags : LookupFlags ,
392
392
path : & [ u8 ] ,
393
- oflags : Oflags ,
393
+ oflags : OFlags ,
394
394
fs_rights_base : Rights ,
395
395
fs_rights_inheriting : Rights ,
396
- fs_flags : Fdflags ,
396
+ fs_flags : FdFlags ,
397
397
) -> ( Errno , Fd ) {
398
398
let mut fd = MaybeUninit :: < Fd > :: uninit ( ) ;
399
399
unsafe {
@@ -414,7 +414,7 @@ pub fn path_open(
414
414
}
415
415
}
416
416
417
- pub fn fd_readdir ( fd : Fd , buf : & mut [ u8 ] , cookie : Dircookie ) -> ( Errno , usize ) {
417
+ pub fn fd_readdir ( fd : Fd , buf : & mut [ u8 ] , cookie : DirCookie ) -> ( Errno , usize ) {
418
418
let mut bufused = MaybeUninit :: < usize > :: uninit ( ) ;
419
419
unsafe {
420
420
(
@@ -460,8 +460,8 @@ pub fn path_rename(old_fd: Fd, old_path: &[u8], new_fd: Fd, new_path: &[u8]) ->
460
460
}
461
461
}
462
462
463
- pub fn fd_filestat_get ( fd : Fd ) -> ( Errno , Filestat ) {
464
- let mut buf = MaybeUninit :: < Filestat > :: uninit ( ) ;
463
+ pub fn fd_filestat_get ( fd : Fd ) -> ( Errno , FileStat ) {
464
+ let mut buf = MaybeUninit :: < FileStat > :: uninit ( ) ;
465
465
unsafe {
466
466
(
467
467
__wasi_fd_filestat_get ( fd, buf. as_mut_ptr ( ) ) ,
@@ -474,17 +474,17 @@ pub fn fd_filestat_set_times(
474
474
fd : Fd ,
475
475
st_atim : Timestamp ,
476
476
st_mtim : Timestamp ,
477
- fstflags : Fstflags ,
477
+ fstflags : FstFlags ,
478
478
) -> Errno {
479
479
unsafe { __wasi_fd_filestat_set_times ( fd, st_atim, st_mtim, fstflags) }
480
480
}
481
481
482
- pub fn fd_filestat_set_size ( fd : Fd , st_size : Filesize ) -> Errno {
482
+ pub fn fd_filestat_set_size ( fd : Fd , st_size : FileSize ) -> Errno {
483
483
unsafe { __wasi_fd_filestat_set_size ( fd, st_size) }
484
484
}
485
485
486
- pub fn path_filestat_get ( fd : Fd , flags : Lookupflags , path : & [ u8 ] ) -> ( Errno , Filestat ) {
487
- let mut buf = MaybeUninit :: < Filestat > :: uninit ( ) ;
486
+ pub fn path_filestat_get ( fd : Fd , flags : LookupFlags , path : & [ u8 ] ) -> ( Errno , FileStat ) {
487
+ let mut buf = MaybeUninit :: < FileStat > :: uninit ( ) ;
488
488
unsafe {
489
489
(
490
490
__wasi_path_filestat_get ( fd, flags, path. as_ptr ( ) , path. len ( ) , buf. as_mut_ptr ( ) ) ,
@@ -495,11 +495,11 @@ pub fn path_filestat_get(fd: Fd, flags: Lookupflags, path: &[u8]) -> (Errno, Fil
495
495
496
496
pub fn path_filestat_set_times (
497
497
fd : Fd ,
498
- flags : Lookupflags ,
498
+ flags : LookupFlags ,
499
499
path : & [ u8 ] ,
500
500
st_atim : Timestamp ,
501
501
st_mtim : Timestamp ,
502
- fstflags : Fstflags ,
502
+ fstflags : FstFlags ,
503
503
) -> Errno {
504
504
unsafe {
505
505
__wasi_path_filestat_set_times (
@@ -550,17 +550,17 @@ pub fn poll_oneoff(in_: &[Subscription], out: &mut [Event]) -> (Errno, usize) {
550
550
}
551
551
}
552
552
553
- pub fn proc_exit ( rval : Exitcode ) {
553
+ pub fn proc_exit ( rval : ExitCode ) {
554
554
unsafe { __wasi_proc_exit ( rval) }
555
555
}
556
556
557
557
pub fn proc_raise ( sig : Signal ) -> Errno {
558
558
unsafe { __wasi_proc_raise ( sig) }
559
559
}
560
560
561
- pub fn sock_recv ( sock : Fd , ri_data : & [ Iovec ] , ri_flags : Riflags ) -> ( Errno , usize , Roflags ) {
561
+ pub fn sock_recv ( sock : Fd , ri_data : & [ Iovec ] , ri_flags : RiFlags ) -> ( Errno , usize , RoFlags ) {
562
562
let mut ro_datalen = MaybeUninit :: < usize > :: uninit ( ) ;
563
- let mut ro_flags = MaybeUninit :: < Roflags > :: uninit ( ) ;
563
+ let mut ro_flags = MaybeUninit :: < RoFlags > :: uninit ( ) ;
564
564
unsafe {
565
565
(
566
566
__wasi_sock_recv (
@@ -577,7 +577,7 @@ pub fn sock_recv(sock: Fd, ri_data: &[Iovec], ri_flags: Riflags) -> (Errno, usiz
577
577
}
578
578
}
579
579
580
- pub fn sock_send ( sock : Fd , si_data : & [ Ciovec ] , si_flags : Siflags ) -> ( Errno , usize ) {
580
+ pub fn sock_send ( sock : Fd , si_data : & [ CIovec ] , si_flags : SiFlags ) -> ( Errno , usize ) {
581
581
let mut so_datalen = MaybeUninit :: < usize > :: uninit ( ) ;
582
582
unsafe {
583
583
(
@@ -593,7 +593,7 @@ pub fn sock_send(sock: Fd, si_data: &[Ciovec], si_flags: Siflags) -> (Errno, usi
593
593
}
594
594
}
595
595
596
- pub fn sock_shutdown ( sock : Fd , how : Sdflags ) -> Errno {
596
+ pub fn sock_shutdown ( sock : Fd , how : SdFlags ) -> Errno {
597
597
unsafe { __wasi_sock_shutdown ( sock, how) }
598
598
}
599
599
0 commit comments