grain
grain copied to clipboard
`fdPrestatGet` contains a hack for null-terminated strings
Due to a bug in uvwasi, wasm runtimes that use it for their wasi implementations return a null-terminated string from fd_prestat_get
, including the null terminator in the length. We have a hack that detects this and manually updates the length of the string. This should be removed when this is patched in uvwasi. See https://github.com/nodejs/uvwasi/pull/202 for tracking.
The hack was introduced in #1585