wasi-libc icon indicating copy to clipboard operation
wasi-libc copied to clipboard

Unused fields in struct stat

Open sunfishcode opened this issue 5 years ago • 1 comments

The WASI libc stat implementation doesn't currently assign the following fields in struct stat: st_uid, st_gid, st_rdev, st_blocks, st_blksize.

The current WASI API doesn't currently provide the information needed to fill these fields in. So for each of these fields, we should decide whether to add something to WASI, leave the field as-is with a placeholder value (they're currently set to 0), or remove the field.

sunfishcode avatar Jul 26 '19 13:07 sunfishcode

It makes sense to me to leave them for possible future use. Since these modules can be thought of as emulating POSIX I can't see why we wouldn't one day want to extent to emulate users, groups, and block devices.

sbc100 avatar Aug 06 '19 22:08 sbc100