WASI
WASI copied to clipboard
Error code for file offsets outside the range of `s64`
The filesize type is defined as unsigned u64. In POSIX, off_t is a signed type.
Most practical implementations won't support file sizes >= 263, so: what error code should implementations return if users attempt to create files that large? The natural behavior for POSIX-based implementations is EINVAL, corresponding to inval in wasi-filesystem. That makes sense in POSIX because it corresponds to a request to create a "negative" file size, which is not valid to request. However, size WASI has an unsigned type, perhaps it would be more natural to use insufficient-space?