alexcrichton opened PR #7152 from alexcrichton:wasi-stream-error-information
to bytecodealliance:main
:
This commit adds a new
error
resource to thewasi:io/streams
interface. Thiserror
resource is returned as part of
last-operation-failed
and serves as a means to discover through other
interfaces more granular type information than a generic string. This
error type has a new function in thefilesystem
interface, for
example, which enables getting filesystem-related error codes from I/O
performed on filesystem-originating streams. This is plumbed through to
the adapter as well to return more thanERRNO_IO
from failed
read/write operations now too.This is not super fancy just yet but is intended to be a vector through
which future additions can be done. The main thing this enables is to
avoid dropping errors on the floor in the host and enabling the guest to
discover further information about I/O errors on streams.Closes https://github.com/bytecodealliance/wasmtime/issues/7017
alexcrichton requested elliottt for a review on PR #7152.
alexcrichton requested fitzgen for a review on PR #7152.
alexcrichton requested wasmtime-core-reviewers for a review on PR #7152.
elliottt submitted PR review:
This looks great!
elliottt submitted PR review:
This looks great!
elliottt created PR review comment:
The syntax for naming resources in
with
turned this intodemo:pkg/a/b
, would it make the sense to do the same here?
elliottt created PR review comment:
/// `stream-error` values are returned whenever an
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Agreed! I'll do this in a follow up as I'd also like to change
"...": Type
to"..." => Type
alexcrichton updated PR #7152.
alexcrichton has enabled auto merge for PR #7152.
alexcrichton updated PR #7152.
alexcrichton updated PR #7152.
alexcrichton has enabled auto merge for PR #7152.
alexcrichton merged PR #7152.
Last updated: Dec 23 2024 at 13:07 UTC