I'm doing a minimal WASI implementation for internal use, and noticing a few things in the spec that are unclear.
The current one I am struggling with is fd_prestat_dir_name. I assume it returns a C-style 0-terminated string? That should be made clear if so.
Also, what happens if the buffer you pass in is too short for the name?
Yeah; this is an area we've not polished a lot, because we expect to switch it to interface types, where we can just say it returns a string
It does not return a NUL-terminated string; the length of the string is the pr_name_len
field from the prestat_get
call
If the buffer is too small, I think it's an inval
error, iirc.
Last updated: Dec 23 2024 at 12:05 UTC