WebAssembly / wasi-libc

WASI libc implementation for WebAssembly
https://wasi.dev
Other
862 stars 203 forks source link

Unused fields in struct stat #90

Open sunfishcode opened 5 years ago

sunfishcode commented 5 years ago

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.

sbc100 commented 5 years ago

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.