From 9fba2fb47995914bf5b0f48ad41bdaa833a0a121 Mon Sep 17 00:00:00 2001 From: Dave Bakker Date: Sat, 10 Jan 2026 16:09:24 +0100 Subject: [PATCH 1/2] Return `future` from `write/send` methods. --- proposals/cli/wit-0.3.0-draft/stdio.wit | 4 ++-- proposals/filesystem/wit-0.3.0-draft/types.wit | 6 +++--- proposals/sockets/wit-0.3.0-draft/types.wit | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/proposals/cli/wit-0.3.0-draft/stdio.wit b/proposals/cli/wit-0.3.0-draft/stdio.wit index b4a106bf..5de27a08 100644 --- a/proposals/cli/wit-0.3.0-draft/stdio.wit +++ b/proposals/cli/wit-0.3.0-draft/stdio.wit @@ -45,7 +45,7 @@ interface stdout { /// Otherwise if there is an error the readable end of the stream will be /// dropped and this function will return an error-code. @since(version = 0.3.0-rc-2026-01-06) - write-via-stream: async func(data: stream) -> result<_, error-code>; + write-via-stream: func(data: stream) -> future>; } @since(version = 0.3.0-rc-2026-01-06) @@ -61,5 +61,5 @@ interface stderr { /// Otherwise if there is an error the readable end of the stream will be /// dropped and this function will return an error-code. @since(version = 0.3.0-rc-2026-01-06) - write-via-stream: async func(data: stream) -> result<_, error-code>; + write-via-stream: func(data: stream) -> future>; } diff --git a/proposals/filesystem/wit-0.3.0-draft/types.wit b/proposals/filesystem/wit-0.3.0-draft/types.wit index 70271e2e..8ba3c929 100644 --- a/proposals/filesystem/wit-0.3.0-draft/types.wit +++ b/proposals/filesystem/wit-0.3.0-draft/types.wit @@ -329,12 +329,12 @@ interface types { /// /// Note: This is similar to `pwrite` in POSIX. @since(version = 0.3.0-rc-2026-01-06) - write-via-stream: async func( + write-via-stream: func( /// Data to write data: stream, /// The offset within the file at which to start writing. offset: filesize, - ) -> result<_, error-code>; + ) -> future>; /// Return a stream for appending to a file, if available. /// @@ -345,7 +345,7 @@ interface types { /// /// Note: This is similar to `write` with `O_APPEND` in POSIX. @since(version = 0.3.0-rc-2026-01-06) - append-via-stream: async func(data: stream) -> result<_, error-code>; + append-via-stream: func(data: stream) -> future>; /// Provide file advisory information on a descriptor. /// diff --git a/proposals/sockets/wit-0.3.0-draft/types.wit b/proposals/sockets/wit-0.3.0-draft/types.wit index 02b1bb7e..f649b5c9 100644 --- a/proposals/sockets/wit-0.3.0-draft/types.wit +++ b/proposals/sockets/wit-0.3.0-draft/types.wit @@ -309,7 +309,7 @@ interface types { /// - /// - @since(version = 0.3.0-rc-2026-01-06) - send: async func(data: stream) -> result<_, error-code>; + send: func(data: stream) -> future>; /// Read data from peer. /// From d72bd38eb3f584f0c82ec103c2996d69c35c4963 Mon Sep 17 00:00:00 2001 From: Victor Adossi Date: Thu, 5 Feb 2026 06:25:46 +0900 Subject: [PATCH 2/2] chore(cli): update wit-deps lock file --- proposals/cli/wit-0.3.0-draft/deps.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/proposals/cli/wit-0.3.0-draft/deps.lock b/proposals/cli/wit-0.3.0-draft/deps.lock index 9d73740f..47ab5072 100644 --- a/proposals/cli/wit-0.3.0-draft/deps.lock +++ b/proposals/cli/wit-0.3.0-draft/deps.lock @@ -5,8 +5,8 @@ sha512 = "702dd507f4d26b7b2ddfcfe8186532683824a21af1c9eadbe47359690e83be66c047c5 [filesystem] path = "../../filesystem/wit-0.3.0-draft" -sha256 = "73bb959d03febb7c68f2c4a272ffa32c4e91f0ee0244ff1e78caa762f6576c3f" -sha512 = "187d10c64fb2c3172214be6fdb81255551abf5df4a9677da080c4e1e3cb598a6d370af371b01ceb068ae7dd2454acf8e2a5c14a51855e177ef50303361588b5a" +sha256 = "cd5657f5fdc0149bb583e92f277116240f7b1a9cadb8750e6917a23238e11925" +sha512 = "9b35bcf232b1a1a97f9a424fdf92e706b08a4a511b29bdc63697ae4440dfb94933eee4c39299c1ff020351daaadd36c935d1d360852eebbae0eeed8468c6fdcf" [random] path = "../../random/wit-0.3.0-draft" @@ -15,5 +15,5 @@ sha512 = "904912869d515a3ddb474d8fe3e273a71e76f897e4156ffc3107e4aa4ce6c7716ed52b [sockets] path = "../../sockets/wit-0.3.0-draft" -sha256 = "64d37fcd1d5c896bd692d1856520ce24af0be71083089758a9e42b4f94c24a1d" -sha512 = "7ac104891d5f6485511d5bb4789802f9bc0bc1992cb52c582ce17c03069100d1e592563e139bc92f0b751711f07724d26b728cb67c406198346262fc7cfcee0b" +sha256 = "9c09060b2cf31aac28ec166299c6e38005cca1d9b40728d05d032fb18494e3b8" +sha512 = "db5a799c2b0b6b7843a7aacbb57f60382d6202f99e159d60fe3c37cb83ec445abc790fcb45fa766f396c241429ddcd527593bc9a711bf779fa967aeec5b88922"