Stream: wasi

Topic: How to handle poll.poll empty poll list


view this post on Zulip appcypher (Apr 24 2024 at 09:02):

wasi:io/poll.poll wit definition contains this part:

This function does not return a result; polling in itself does not
do any I/O so it doesn't fail.

but there is at least one invariant:

The result list<u32> contains one or more indices of handles in the
argument list that is ready for I/O.

How should we handle the case where the pollable list argument is empty?
wasmtime_wasi returns an error.

A fast and secure runtime for WebAssembly. Contribute to bytecodealliance/wasmtime development by creating an account on GitHub.

view this post on Zulip Dave Bakker (badeend) (Apr 24 2024 at 09:09):

Wasmtime traps. There is a open PR to codify this in the spec:
https://github.com/WebAssembly/wasi-io/pull/69

Fixes #67

view this post on Zulip appcypher (Apr 24 2024 at 09:57):

Dave Bakker (badeend) said:

Wasmtime traps. There is a open PR to codify this in the spec:
https://github.com/WebAssembly/wasi-io/pull/69

Thanks. I will also go with trapping for now.


Last updated: Dec 23 2024 at 12:05 UTC