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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
|
/* automatically generated by rust-bindgen */
pub const __WASI_ADVICE_NORMAL: u32 = 0;
pub const __WASI_ADVICE_SEQUENTIAL: u32 = 1;
pub const __WASI_ADVICE_RANDOM: u32 = 2;
pub const __WASI_ADVICE_WILLNEED: u32 = 3;
pub const __WASI_ADVICE_DONTNEED: u32 = 4;
pub const __WASI_ADVICE_NOREUSE: u32 = 5;
pub const __WASI_CLOCK_REALTIME: u32 = 0;
pub const __WASI_CLOCK_MONOTONIC: u32 = 1;
pub const __WASI_CLOCK_PROCESS_CPUTIME_ID: u32 = 2;
pub const __WASI_CLOCK_THREAD_CPUTIME_ID: u32 = 3;
pub const __WASI_DIRCOOKIE_START: u32 = 0;
pub const __WASI_ESUCCESS: u32 = 0;
pub const __WASI_E2BIG: u32 = 1;
pub const __WASI_EACCES: u32 = 2;
pub const __WASI_EADDRINUSE: u32 = 3;
pub const __WASI_EADDRNOTAVAIL: u32 = 4;
pub const __WASI_EAFNOSUPPORT: u32 = 5;
pub const __WASI_EAGAIN: u32 = 6;
pub const __WASI_EALREADY: u32 = 7;
pub const __WASI_EBADF: u32 = 8;
pub const __WASI_EBADMSG: u32 = 9;
pub const __WASI_EBUSY: u32 = 10;
pub const __WASI_ECANCELED: u32 = 11;
pub const __WASI_ECHILD: u32 = 12;
pub const __WASI_ECONNABORTED: u32 = 13;
pub const __WASI_ECONNREFUSED: u32 = 14;
pub const __WASI_ECONNRESET: u32 = 15;
pub const __WASI_EDEADLK: u32 = 16;
pub const __WASI_EDESTADDRREQ: u32 = 17;
pub const __WASI_EDOM: u32 = 18;
pub const __WASI_EDQUOT: u32 = 19;
pub const __WASI_EEXIST: u32 = 20;
pub const __WASI_EFAULT: u32 = 21;
pub const __WASI_EFBIG: u32 = 22;
pub const __WASI_EHOSTUNREACH: u32 = 23;
pub const __WASI_EIDRM: u32 = 24;
pub const __WASI_EILSEQ: u32 = 25;
pub const __WASI_EINPROGRESS: u32 = 26;
pub const __WASI_EINTR: u32 = 27;
pub const __WASI_EINVAL: u32 = 28;
pub const __WASI_EIO: u32 = 29;
pub const __WASI_EISCONN: u32 = 30;
pub const __WASI_EISDIR: u32 = 31;
pub const __WASI_ELOOP: u32 = 32;
pub const __WASI_EMFILE: u32 = 33;
pub const __WASI_EMLINK: u32 = 34;
pub const __WASI_EMSGSIZE: u32 = 35;
pub const __WASI_EMULTIHOP: u32 = 36;
pub const __WASI_ENAMETOOLONG: u32 = 37;
pub const __WASI_ENETDOWN: u32 = 38;
pub const __WASI_ENETRESET: u32 = 39;
pub const __WASI_ENETUNREACH: u32 = 40;
pub const __WASI_ENFILE: u32 = 41;
pub const __WASI_ENOBUFS: u32 = 42;
pub const __WASI_ENODEV: u32 = 43;
pub const __WASI_ENOENT: u32 = 44;
pub const __WASI_ENOEXEC: u32 = 45;
pub const __WASI_ENOLCK: u32 = 46;
pub const __WASI_ENOLINK: u32 = 47;
pub const __WASI_ENOMEM: u32 = 48;
pub const __WASI_ENOMSG: u32 = 49;
pub const __WASI_ENOPROTOOPT: u32 = 50;
pub const __WASI_ENOSPC: u32 = 51;
pub const __WASI_ENOSYS: u32 = 52;
pub const __WASI_ENOTCONN: u32 = 53;
pub const __WASI_ENOTDIR: u32 = 54;
pub const __WASI_ENOTEMPTY: u32 = 55;
pub const __WASI_ENOTRECOVERABLE: u32 = 56;
pub const __WASI_ENOTSOCK: u32 = 57;
pub const __WASI_ENOTSUP: u32 = 58;
pub const __WASI_ENOTTY: u32 = 59;
pub const __WASI_ENXIO: u32 = 60;
pub const __WASI_EOVERFLOW: u32 = 61;
pub const __WASI_EOWNERDEAD: u32 = 62;
pub const __WASI_EPERM: u32 = 63;
pub const __WASI_EPIPE: u32 = 64;
pub const __WASI_EPROTO: u32 = 65;
pub const __WASI_EPROTONOSUPPORT: u32 = 66;
pub const __WASI_EPROTOTYPE: u32 = 67;
pub const __WASI_ERANGE: u32 = 68;
pub const __WASI_EROFS: u32 = 69;
pub const __WASI_ESPIPE: u32 = 70;
pub const __WASI_ESRCH: u32 = 71;
pub const __WASI_ESTALE: u32 = 72;
pub const __WASI_ETIMEDOUT: u32 = 73;
pub const __WASI_ETXTBSY: u32 = 74;
pub const __WASI_EXDEV: u32 = 75;
pub const __WASI_ENOTCAPABLE: u32 = 76;
pub const __WASI_EVENT_FD_READWRITE_HANGUP: u32 = 1;
pub const __WASI_EVENTTYPE_CLOCK: u32 = 0;
pub const __WASI_EVENTTYPE_FD_READ: u32 = 1;
pub const __WASI_EVENTTYPE_FD_WRITE: u32 = 2;
pub const __WASI_FDFLAG_APPEND: u32 = 1;
pub const __WASI_FDFLAG_DSYNC: u32 = 2;
pub const __WASI_FDFLAG_NONBLOCK: u32 = 4;
pub const __WASI_FDFLAG_RSYNC: u32 = 8;
pub const __WASI_FDFLAG_SYNC: u32 = 16;
pub const __WASI_FILETYPE_UNKNOWN: u32 = 0;
pub const __WASI_FILETYPE_BLOCK_DEVICE: u32 = 1;
pub const __WASI_FILETYPE_CHARACTER_DEVICE: u32 = 2;
pub const __WASI_FILETYPE_DIRECTORY: u32 = 3;
pub const __WASI_FILETYPE_REGULAR_FILE: u32 = 4;
pub const __WASI_FILETYPE_SOCKET_DGRAM: u32 = 5;
pub const __WASI_FILETYPE_SOCKET_STREAM: u32 = 6;
pub const __WASI_FILETYPE_SYMBOLIC_LINK: u32 = 7;
pub const __WASI_FILESTAT_SET_ATIM: u32 = 1;
pub const __WASI_FILESTAT_SET_ATIM_NOW: u32 = 2;
pub const __WASI_FILESTAT_SET_MTIM: u32 = 4;
pub const __WASI_FILESTAT_SET_MTIM_NOW: u32 = 8;
pub const __WASI_LOOKUP_SYMLINK_FOLLOW: u32 = 1;
pub const __WASI_O_CREAT: u32 = 1;
pub const __WASI_O_DIRECTORY: u32 = 2;
pub const __WASI_O_EXCL: u32 = 4;
pub const __WASI_O_TRUNC: u32 = 8;
pub const __WASI_SOCK_RECV_PEEK: u32 = 1;
pub const __WASI_SOCK_RECV_WAITALL: u32 = 2;
pub const __WASI_RIGHT_FD_DATASYNC: u32 = 1;
pub const __WASI_RIGHT_FD_READ: u32 = 2;
pub const __WASI_RIGHT_FD_SEEK: u32 = 4;
pub const __WASI_RIGHT_FD_FDSTAT_SET_FLAGS: u32 = 8;
pub const __WASI_RIGHT_FD_SYNC: u32 = 16;
pub const __WASI_RIGHT_FD_TELL: u32 = 32;
pub const __WASI_RIGHT_FD_WRITE: u32 = 64;
pub const __WASI_RIGHT_FD_ADVISE: u32 = 128;
pub const __WASI_RIGHT_FD_ALLOCATE: u32 = 256;
pub const __WASI_RIGHT_PATH_CREATE_DIRECTORY: u32 = 512;
pub const __WASI_RIGHT_PATH_CREATE_FILE: u32 = 1024;
pub const __WASI_RIGHT_PATH_LINK_SOURCE: u32 = 2048;
pub const __WASI_RIGHT_PATH_LINK_TARGET: u32 = 4096;
pub const __WASI_RIGHT_PATH_OPEN: u32 = 8192;
pub const __WASI_RIGHT_FD_READDIR: u32 = 16384;
pub const __WASI_RIGHT_PATH_READLINK: u32 = 32768;
pub const __WASI_RIGHT_PATH_RENAME_SOURCE: u32 = 65536;
pub const __WASI_RIGHT_PATH_RENAME_TARGET: u32 = 131072;
pub const __WASI_RIGHT_PATH_FILESTAT_GET: u32 = 262144;
pub const __WASI_RIGHT_PATH_FILESTAT_SET_SIZE: u32 = 524288;
pub const __WASI_RIGHT_PATH_FILESTAT_SET_TIMES: u32 = 1048576;
pub const __WASI_RIGHT_FD_FILESTAT_GET: u32 = 2097152;
pub const __WASI_RIGHT_FD_FILESTAT_SET_SIZE: u32 = 4194304;
pub const __WASI_RIGHT_FD_FILESTAT_SET_TIMES: u32 = 8388608;
pub const __WASI_RIGHT_PATH_SYMLINK: u32 = 16777216;
pub const __WASI_RIGHT_PATH_REMOVE_DIRECTORY: u32 = 33554432;
pub const __WASI_RIGHT_PATH_UNLINK_FILE: u32 = 67108864;
pub const __WASI_RIGHT_POLL_FD_READWRITE: u32 = 134217728;
pub const __WASI_RIGHT_SOCK_SHUTDOWN: u32 = 268435456;
pub const __WASI_SOCK_RECV_DATA_TRUNCATED: u32 = 1;
pub const __WASI_SHUT_RD: u32 = 1;
pub const __WASI_SHUT_WR: u32 = 2;
pub const __WASI_SIGHUP: u32 = 1;
pub const __WASI_SIGINT: u32 = 2;
pub const __WASI_SIGQUIT: u32 = 3;
pub const __WASI_SIGILL: u32 = 4;
pub const __WASI_SIGTRAP: u32 = 5;
pub const __WASI_SIGABRT: u32 = 6;
pub const __WASI_SIGBUS: u32 = 7;
pub const __WASI_SIGFPE: u32 = 8;
pub const __WASI_SIGKILL: u32 = 9;
pub const __WASI_SIGUSR1: u32 = 10;
pub const __WASI_SIGSEGV: u32 = 11;
pub const __WASI_SIGUSR2: u32 = 12;
pub const __WASI_SIGPIPE: u32 = 13;
pub const __WASI_SIGALRM: u32 = 14;
pub const __WASI_SIGTERM: u32 = 15;
pub const __WASI_SIGCHLD: u32 = 16;
pub const __WASI_SIGCONT: u32 = 17;
pub const __WASI_SIGSTOP: u32 = 18;
pub const __WASI_SIGTSTP: u32 = 19;
pub const __WASI_SIGTTIN: u32 = 20;
pub const __WASI_SIGTTOU: u32 = 21;
pub const __WASI_SIGURG: u32 = 22;
pub const __WASI_SIGXCPU: u32 = 23;
pub const __WASI_SIGXFSZ: u32 = 24;
pub const __WASI_SIGVTALRM: u32 = 25;
pub const __WASI_SIGPROF: u32 = 26;
pub const __WASI_SIGWINCH: u32 = 27;
pub const __WASI_SIGPOLL: u32 = 28;
pub const __WASI_SIGPWR: u32 = 29;
pub const __WASI_SIGSYS: u32 = 30;
pub const __WASI_SUBSCRIPTION_CLOCK_ABSTIME: u32 = 1;
pub const __WASI_WHENCE_CUR: u32 = 0;
pub const __WASI_WHENCE_END: u32 = 1;
pub const __WASI_WHENCE_SET: u32 = 2;
pub const __WASI_PREOPENTYPE_DIR: u32 = 0;
pub type __wasi_advice_t = u8;
pub type __wasi_clockid_t = u32;
pub type __wasi_device_t = u64;
pub type __wasi_dircookie_t = u64;
pub type __wasi_errno_t = u16;
pub type __wasi_eventrwflags_t = u16;
pub type __wasi_eventtype_t = u8;
pub type __wasi_exitcode_t = u32;
pub type __wasi_fd_t = u32;
pub type __wasi_fdflags_t = u16;
pub type __wasi_filedelta_t = i64;
pub type __wasi_filesize_t = u64;
pub type __wasi_filetype_t = u8;
pub type __wasi_fstflags_t = u16;
pub type __wasi_inode_t = u64;
pub type __wasi_linkcount_t = u32;
pub type __wasi_lookupflags_t = u32;
pub type __wasi_oflags_t = u16;
pub type __wasi_riflags_t = u16;
pub type __wasi_rights_t = u64;
pub type __wasi_roflags_t = u16;
pub type __wasi_sdflags_t = u8;
pub type __wasi_siflags_t = u16;
pub type __wasi_signal_t = u8;
pub type __wasi_subclockflags_t = u16;
pub type __wasi_timestamp_t = u64;
pub type __wasi_userdata_t = u64;
pub type __wasi_whence_t = u8;
pub type __wasi_preopentype_t = u8;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __wasi_dirent_t {
pub d_next: __wasi_dircookie_t,
pub d_ino: __wasi_inode_t,
pub d_namlen: u32,
pub d_type: __wasi_filetype_t,
}
#[test]
fn bindgen_test_layout___wasi_dirent_t() {
assert_eq!(
::std::mem::size_of::<__wasi_dirent_t>(),
24usize,
concat!("Size of: ", stringify!(__wasi_dirent_t))
);
assert_eq!(
::std::mem::align_of::<__wasi_dirent_t>(),
8usize,
concat!("Alignment of ", stringify!(__wasi_dirent_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_next as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__wasi_dirent_t),
"::",
stringify!(d_next)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_ino as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__wasi_dirent_t),
"::",
stringify!(d_ino)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_namlen as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__wasi_dirent_t),
"::",
stringify!(d_namlen)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_type as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(__wasi_dirent_t),
"::",
stringify!(d_type)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __wasi_event_t {
pub userdata: __wasi_userdata_t,
pub error: __wasi_errno_t,
pub type_: __wasi_eventtype_t,
pub u: __wasi_event_t___wasi_event_u,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __wasi_event_t___wasi_event_u {
pub fd_readwrite: __wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t,
_bindgen_union_align: [u64; 2usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t {
pub nbytes: __wasi_filesize_t,
pub flags: __wasi_eventrwflags_t,
}
#[test]
fn bindgen_test_layout___wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t() {
assert_eq!(
::std::mem::size_of::<__wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t>(),
16usize,
concat!(
"Size of: ",
stringify!(__wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t)
)
);
assert_eq!(
::std::mem::align_of::<__wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t>(),
8usize,
concat!(
"Alignment of ",
stringify!(__wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t>()))
.nbytes as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t),
"::",
stringify!(nbytes)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t>()))
.flags as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(__wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t),
"::",
stringify!(flags)
)
);
}
#[test]
fn bindgen_test_layout___wasi_event_t___wasi_event_u() {
assert_eq!(
::std::mem::size_of::<__wasi_event_t___wasi_event_u>(),
16usize,
concat!("Size of: ", stringify!(__wasi_event_t___wasi_event_u))
);
assert_eq!(
::std::mem::align_of::<__wasi_event_t___wasi_event_u>(),
8usize,
concat!("Alignment of ", stringify!(__wasi_event_t___wasi_event_u))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__wasi_event_t___wasi_event_u>())).fd_readwrite as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__wasi_event_t___wasi_event_u),
"::",
stringify!(fd_readwrite)
)
);
}
#[test]
fn bindgen_test_layout___wasi_event_t() {
assert_eq!(
::std::mem::size_of::<__wasi_event_t>(),
32usize,
concat!("Size of: ", stringify!(__wasi_event_t))
);
assert_eq!(
::std::mem::align_of::<__wasi_event_t>(),
8usize,
concat!("Alignment of ", stringify!(__wasi_event_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).userdata as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__wasi_event_t),
"::",
stringify!(userdata)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).error as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__wasi_event_t),
"::",
stringify!(error)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).type_ as *const _ as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(__wasi_event_t),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).u as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__wasi_event_t),
"::",
stringify!(u)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __wasi_prestat_t {
pub pr_type: __wasi_preopentype_t,
pub u: __wasi_prestat_t___wasi_prestat_u,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __wasi_prestat_t___wasi_prestat_u {
pub dir: __wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t,
_bindgen_union_align: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t {
pub pr_name_len: usize,
}
#[test]
fn bindgen_test_layout___wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t() {
assert_eq!(
::std::mem::size_of::<__wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t>(),
8usize,
concat!(
"Size of: ",
stringify!(__wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t)
)
);
assert_eq!(
::std::mem::align_of::<__wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t>(),
8usize,
concat!(
"Alignment of ",
stringify!(__wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t>()))
.pr_name_len as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t),
"::",
stringify!(pr_name_len)
)
);
}
#[test]
fn bindgen_test_layout___wasi_prestat_t___wasi_prestat_u() {
assert_eq!(
::std::mem::size_of::<__wasi_prestat_t___wasi_prestat_u>(),
8usize,
concat!("Size of: ", stringify!(__wasi_prestat_t___wasi_prestat_u))
);
assert_eq!(
::std::mem::align_of::<__wasi_prestat_t___wasi_prestat_u>(),
8usize,
concat!(
"Alignment of ",
stringify!(__wasi_prestat_t___wasi_prestat_u)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__wasi_prestat_t___wasi_prestat_u>())).dir as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__wasi_prestat_t___wasi_prestat_u),
"::",
stringify!(dir)
)
);
}
#[test]
fn bindgen_test_layout___wasi_prestat_t() {
assert_eq!(
::std::mem::size_of::<__wasi_prestat_t>(),
16usize,
concat!("Size of: ", stringify!(__wasi_prestat_t))
);
assert_eq!(
::std::mem::align_of::<__wasi_prestat_t>(),
8usize,
concat!("Alignment of ", stringify!(__wasi_prestat_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_prestat_t>())).pr_type as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__wasi_prestat_t),
"::",
stringify!(pr_type)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_prestat_t>())).u as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__wasi_prestat_t),
"::",
stringify!(u)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __wasi_fdstat_t {
pub fs_filetype: __wasi_filetype_t,
pub fs_flags: __wasi_fdflags_t,
pub fs_rights_base: __wasi_rights_t,
pub fs_rights_inheriting: __wasi_rights_t,
}
#[test]
fn bindgen_test_layout___wasi_fdstat_t() {
assert_eq!(
::std::mem::size_of::<__wasi_fdstat_t>(),
24usize,
concat!("Size of: ", stringify!(__wasi_fdstat_t))
);
assert_eq!(
::std::mem::align_of::<__wasi_fdstat_t>(),
8usize,
concat!("Alignment of ", stringify!(__wasi_fdstat_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_filetype as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__wasi_fdstat_t),
"::",
stringify!(fs_filetype)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_flags as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(__wasi_fdstat_t),
"::",
stringify!(fs_flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_rights_base as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__wasi_fdstat_t),
"::",
stringify!(fs_rights_base)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_rights_inheriting as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(__wasi_fdstat_t),
"::",
stringify!(fs_rights_inheriting)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __wasi_filestat_t {
pub st_dev: __wasi_device_t,
pub st_ino: __wasi_inode_t,
pub st_filetype: __wasi_filetype_t,
pub st_nlink: __wasi_linkcount_t,
pub st_size: __wasi_filesize_t,
pub st_atim: __wasi_timestamp_t,
pub st_mtim: __wasi_timestamp_t,
pub st_ctim: __wasi_timestamp_t,
}
#[test]
fn bindgen_test_layout___wasi_filestat_t() {
assert_eq!(
::std::mem::size_of::<__wasi_filestat_t>(),
56usize,
concat!("Size of: ", stringify!(__wasi_filestat_t))
);
assert_eq!(
::std::mem::align_of::<__wasi_filestat_t>(),
8usize,
concat!("Alignment of ", stringify!(__wasi_filestat_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).st_dev as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__wasi_filestat_t),
"::",
stringify!(st_dev)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).st_ino as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__wasi_filestat_t),
"::",
stringify!(st_ino)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).st_filetype as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__wasi_filestat_t),
"::",
stringify!(st_filetype)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).st_nlink as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(__wasi_filestat_t),
"::",
stringify!(st_nlink)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).st_size as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(__wasi_filestat_t),
"::",
stringify!(st_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).st_atim as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(__wasi_filestat_t),
"::",
stringify!(st_atim)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).st_mtim as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(__wasi_filestat_t),
"::",
stringify!(st_mtim)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).st_ctim as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(__wasi_filestat_t),
"::",
stringify!(st_ctim)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __wasi_ciovec_t {
pub buf: *const ::std::os::raw::c_void,
pub buf_len: usize,
}
#[test]
fn bindgen_test_layout___wasi_ciovec_t() {
assert_eq!(
::std::mem::size_of::<__wasi_ciovec_t>(),
16usize,
concat!("Size of: ", stringify!(__wasi_ciovec_t))
);
assert_eq!(
::std::mem::align_of::<__wasi_ciovec_t>(),
8usize,
concat!("Alignment of ", stringify!(__wasi_ciovec_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_ciovec_t>())).buf as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__wasi_ciovec_t),
"::",
stringify!(buf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_ciovec_t>())).buf_len as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__wasi_ciovec_t),
"::",
stringify!(buf_len)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __wasi_iovec_t {
pub buf: *mut ::std::os::raw::c_void,
pub buf_len: usize,
}
#[test]
fn bindgen_test_layout___wasi_iovec_t() {
assert_eq!(
::std::mem::size_of::<__wasi_iovec_t>(),
16usize,
concat!("Size of: ", stringify!(__wasi_iovec_t))
);
assert_eq!(
::std::mem::align_of::<__wasi_iovec_t>(),
8usize,
concat!("Alignment of ", stringify!(__wasi_iovec_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_iovec_t>())).buf as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__wasi_iovec_t),
"::",
stringify!(buf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_iovec_t>())).buf_len as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__wasi_iovec_t),
"::",
stringify!(buf_len)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __wasi_subscription_t {
pub userdata: __wasi_userdata_t,
pub type_: __wasi_eventtype_t,
pub u: __wasi_subscription_t___wasi_subscription_u,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __wasi_subscription_t___wasi_subscription_u {
pub clock: __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t,
pub fd_readwrite:
__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t,
_bindgen_union_align: [u64; 5usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t {
pub identifier: __wasi_userdata_t,
pub clock_id: __wasi_clockid_t,
pub timeout: __wasi_timestamp_t,
pub precision: __wasi_timestamp_t,
pub flags: __wasi_subclockflags_t,
}
#[test]
fn bindgen_test_layout___wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t() {
assert_eq!(
::std::mem::size_of::<
__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t,
>(),
40usize,
concat!(
"Size of: ",
stringify!(__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t)
)
);
assert_eq!(
::std::mem::align_of::<
__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t,
>(),
8usize,
concat!(
"Alignment of ",
stringify!(__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<
__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t,
>()))
.identifier as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t),
"::",
stringify!(identifier)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<
__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t,
>()))
.clock_id as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t),
"::",
stringify!(clock_id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<
__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t,
>()))
.timeout as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t),
"::",
stringify!(timeout)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<
__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t,
>()))
.precision as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t),
"::",
stringify!(precision)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<
__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t,
>()))
.flags as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t),
"::",
stringify!(flags)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t {
pub fd: __wasi_fd_t,
}
#[test]
fn bindgen_test_layout___wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t(
) {
assert_eq!(
::std::mem::size_of::<
__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t,
>(),
4usize,
concat!(
"Size of: ",
stringify!(
__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t
)
)
);
assert_eq!(
::std::mem::align_of::<
__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t,
>(),
4usize,
concat!(
"Alignment of ",
stringify!(
__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t
)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<
__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t,
>()))
.fd as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(
__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t
),
"::",
stringify!(fd)
)
);
}
#[test]
fn bindgen_test_layout___wasi_subscription_t___wasi_subscription_u() {
assert_eq!(
::std::mem::size_of::<__wasi_subscription_t___wasi_subscription_u>(),
40usize,
concat!(
"Size of: ",
stringify!(__wasi_subscription_t___wasi_subscription_u)
)
);
assert_eq!(
::std::mem::align_of::<__wasi_subscription_t___wasi_subscription_u>(),
8usize,
concat!(
"Alignment of ",
stringify!(__wasi_subscription_t___wasi_subscription_u)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__wasi_subscription_t___wasi_subscription_u>())).clock
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__wasi_subscription_t___wasi_subscription_u),
"::",
stringify!(clock)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__wasi_subscription_t___wasi_subscription_u>())).fd_readwrite
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__wasi_subscription_t___wasi_subscription_u),
"::",
stringify!(fd_readwrite)
)
);
}
#[test]
fn bindgen_test_layout___wasi_subscription_t() {
assert_eq!(
::std::mem::size_of::<__wasi_subscription_t>(),
56usize,
concat!("Size of: ", stringify!(__wasi_subscription_t))
);
assert_eq!(
::std::mem::align_of::<__wasi_subscription_t>(),
8usize,
concat!("Alignment of ", stringify!(__wasi_subscription_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_subscription_t>())).userdata as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__wasi_subscription_t),
"::",
stringify!(userdata)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_subscription_t>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__wasi_subscription_t),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__wasi_subscription_t>())).u as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__wasi_subscription_t),
"::",
stringify!(u)
)
);
}
|