@@ -959,8 +959,7 @@ export namespace errno {
959959}
960960export type errno = u16 ;
961961
962- /** An event that occurred. */
963- @unmanaged export abstract class event {
962+ @unmanaged abstract class $event { // size=16/32
964963 /** User-provided value that got attached to `subscription#userdata`. */
965964 userdata : userdata ;
966965 /** If non-zero, an error that occurred while processing the subscription request. */
@@ -971,8 +970,14 @@ export type errno = u16;
971970 private __padding0 : u16 ;
972971}
973972
973+ /** An event that occurred. */
974+ @unmanaged export abstract class event extends $event {
975+ private __padding1 : u64 ;
976+ private __padding2 : u64 ;
977+ }
978+
974979/** An event that occurred when type is `eventtype.FD_READ` or `eventtype.FD_WRITE`. */
975- @unmanaged export class event_fd_readwrite extends event {
980+ @unmanaged export class event_fd_readwrite extends $ event {
976981 /* The number of bytes available for reading or writing. */
977982 nbytes : filesize ;
978983 /* The state of the file descriptor. */
@@ -1187,14 +1192,18 @@ export namespace preopentype {
11871192}
11881193export type preopentype = u8 ;
11891194
1190- /* Information about a pre-opened capability. */
1191- export abstract class prestat {
1195+ @unmanaged abstract class $prestat { // WASM32: size=1/8, WASM64: size=1/16
11921196 /* The type of the pre-opened capability. */
11931197 type : preopentype ;
11941198}
11951199
1200+ /* Information about a pre-opened capability. */
1201+ @unmanaged export abstract class prestat extends $prestat {
1202+ private __padding0 : usize ;
1203+ }
1204+
11961205/** The contents of a $prestat when type is `preopentype.DIR`. */
1197- export class prestat_dir extends prestat {
1206+ @ unmanaged export class prestat_dir extends $ prestat {
11981207 /** The length of the directory name for use with `fd_prestat_dir_name`. */
11991208 name_len : usize ;
12001209}
@@ -1491,8 +1500,7 @@ export namespace subclockflags {
14911500}
14921501export type subclockflags = u16 ;
14931502
1494- /** Subscription to an event. */
1495- @unmanaged export abstract class subscription {
1503+ @unmanaged abstract class $subscription { // size=16/48
14961504 /** User-provided value that is attached to the subscription. */
14971505 userdata : userdata ;
14981506 /** The type of the event to which to subscribe. */
@@ -1501,8 +1509,16 @@ export type subclockflags = u16;
15011509 private __padding0 : u32 ;
15021510}
15031511
1512+ /** Subscription to an event. */
1513+ @unmanaged export abstract class subscription extends $subscription {
1514+ private __padding1 : u64 ;
1515+ private __padding2 : u64 ;
1516+ private __padding3 : u64 ;
1517+ private __padding4 : u64 ;
1518+ }
1519+
15041520/* Subscription to an event of type `eventtype.CLOCK`.**/
1505- @unmanaged export class subscription_clock extends subscription {
1521+ @unmanaged export class subscription_clock extends $ subscription {
15061522 /** The clock against which to compare the timestamp. */
15071523 clock_id : clockid ;
15081524 /** The absolute or relative timestamp. */
@@ -1516,9 +1532,13 @@ export type subclockflags = u16;
15161532}
15171533
15181534/* Subscription to an event of type `eventtype.FD_READ` or `eventtype.FD_WRITE`.**/
1519- @unmanaged export class subscription_fd_readwrite extends subscription {
1535+ @unmanaged export class subscription_fd_readwrite extends $ subscription {
15201536 /** The file descriptor on which to wait for it to become ready for reading or writing. */
15211537 file_descriptor : fd ;
1538+
1539+ private __padding1 : u64 ;
1540+ private __padding2 : u64 ;
1541+ private __padding3 : u64 ;
15221542}
15231543
15241544/** Timestamp in nanoseconds. */
0 commit comments