WebAssembly / WebAssembly/WASI
a `st_blksize` analog for `filestat`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.8k
- Forks
- 333
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 3
Description
Some applications rely on struct stat to contain a st_blksize field to determine what size buffer to use. filestat doesn't currently provide this information.
It may also be useful to have a field providing the size of the file without any "holes" included, which would let libc implement a st_blocks field. POSIX's st_blocks is in 512-byte units (regardless of the st_blksize value), which is awkward, but if WASI itself simply provides the size in bytes, libc can divide by 512 to satisfy POSIX.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the WASI filestat interface and the issue's comparison with POSIX struct stat, especially st_blksize and st_blocks. Determine whether WASI should expose buffer block size, hole-free file size, or both, and define byte units that allow libc to derive the POSIX fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100