diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 6f47982..767e091 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -10,15 +10,15 @@ jobs:
name: Check ABI files are up-to-date
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: ensure `./wit/deps` are in sync
run: |
- curl -Lo 'wit-deps' https://github.com/bytecodealliance/wit-deps/releases/download/v0.3.3/wit-deps-x86_64-unknown-linux-musl
+ curl -Lo 'wit-deps' https://github.com/bytecodealliance/wit-deps/releases/download/v0.3.5/wit-deps-x86_64-unknown-linux-musl
chmod +x wit-deps
./wit-deps lock
git add -N wit/deps
git diff --exit-code
- - uses: WebAssembly/wit-abi-up-to-date@v16
+ - uses: WebAssembly/wit-abi-up-to-date@v17
with:
- wit-bindgen: '0.15.0'
+ wit-bindgen: '0.16.0'
worlds: "command imports"
diff --git a/command.md b/command.md
index 928f2f1..2159bd3 100644
--- a/command.md
+++ b/command.md
@@ -206,6 +206,10 @@ polled for using wasi:io/poll
.
[method]input-stream.read: func
Perform a non-blocking read from the stream.
+When the source of a read
is binary data, the bytes from the source
+are returned verbatim. When the source of a read
is known to the
+implementation to be text, bytes containing the UTF-8 encoding of the
+text are returned.
This function returns a list of bytes containing the read data,
when successful. The returned list will contain up to len
bytes;
it may return fewer than requested, but not more. The list is
@@ -301,6 +305,11 @@ error.
[method]output-stream.write: func
Perform a write. This function never blocks.
+When the destination of a write
is binary data, the bytes from
+contents
are written verbatim. When the destination of a write
is
+known to the implementation to be text, the bytes of contents
are
+transcoded from UTF-8 into the encoding of the destination and then
+written.
Precondition: check-write gave permit of Ok(n) and contents has a length of less than or equal to n. Otherwise, this function will trap.
returns Err(closed) without writing if the stream has closed since
@@ -514,11 +523,19 @@ is ready for reading, before performing the splice
.
output-stream
>Terminal input.
+In the future, this may include functions for disabling echoing, +disabling input buffering so that keyboard events are sent through +immediately, querying supported features, and so on.
resource terminal-input
The input side of a terminal.
Terminal output.
+In the future, this may include functions for querying the terminal +size, being notified of terminal size changes, querying supported +features, and so on.
resource terminal-output
The connection was forcefully rejected +
The TCP connection was forcefully rejected
The connection was reset. +
The TCP connection was reset.
A connection was aborted. +
A TCP connection was aborted.
The size of a datagram sent to a UDP socket exceeded the maximum +supported size.
record ipv4-socket-address
port
: u16
address
: ipv4-address
port
: u16
sin_port +
sin_addr +
record ipv6-socket-address
port
: u16
flow-info
: u32
address
: ipv6-address
scope-id
: u32
port
: u16
sin6_port +
flow-info
: u32
sin6_flowinfo +
sin6_addr +
scope-id
: u32
sin6_scope_id +
variant ip-socket-address
not-in-progress
: A bind
operation is not in progress.would-block
: Can't finish the operation, it is still in progress. (EWOULDBLOCK, EAGAIN)When binding to a non-zero port, this bind operation shouldn't be affected by the TIME_WAIT +state of a recently closed socket on the same local address. In practice this means that the SO_REUSEADDR +socket option should be set implicitly on all platforms, except on Windows where this is the default behavior +and SO_REUSEADDR performs something different entirely.
wasi:io/poll
.
[method]input-stream.read: func
Perform a non-blocking read from the stream.
+When the source of a read
is binary data, the bytes from the source
+are returned verbatim. When the source of a read
is known to the
+implementation to be text, bytes containing the UTF-8 encoding of the
+text are returned.
This function returns a list of bytes containing the read data,
when successful. The returned list will contain up to len
bytes;
it may return fewer than requested, but not more. The list is
@@ -296,6 +300,11 @@ error.
[method]output-stream.write: func
Perform a write. This function never blocks.
+When the destination of a write
is binary data, the bytes from
+contents
are written verbatim. When the destination of a write
is
+known to the implementation to be text, the bytes of contents
are
+transcoded from UTF-8 into the encoding of the destination and then
+written.
Precondition: check-write gave permit of Ok(n) and contents has a length of less than or equal to n. Otherwise, this function will trap.
returns Err(closed) without writing if the stream has closed since
@@ -509,11 +518,19 @@ is ready for reading, before performing the splice
.
output-stream
>Terminal input.
+In the future, this may include functions for disabling echoing, +disabling input buffering so that keyboard events are sent through +immediately, querying supported features, and so on.
resource terminal-input
The input side of a terminal.
Terminal output.
+In the future, this may include functions for querying the terminal +size, being notified of terminal size changes, querying supported +features, and so on.
resource terminal-output
The connection was forcefully rejected +
The TCP connection was forcefully rejected
The connection was reset. +
The TCP connection was reset.
A connection was aborted. +
A TCP connection was aborted.
The size of a datagram sent to a UDP socket exceeded the maximum +supported size.
record ipv4-socket-address
port
: u16
address
: ipv4-address
port
: u16
sin_port +
sin_addr +
record ipv6-socket-address
port
: u16
flow-info
: u32
address
: ipv6-address
scope-id
: u32
port
: u16
sin6_port +
flow-info
: u32
sin6_flowinfo +
sin6_addr +
scope-id
: u32
sin6_scope_id +
variant ip-socket-address
not-in-progress
: A bind
operation is not in progress.would-block
: Can't finish the operation, it is still in progress. (EWOULDBLOCK, EAGAIN)When binding to a non-zero port, this bind operation shouldn't be affected by the TIME_WAIT +state of a recently closed socket on the same local address. In practice this means that the SO_REUSEADDR +socket option should be set implicitly on all platforms, except on Windows where this is the default behavior +and SO_REUSEADDR performs something different entirely.