diff --git a/wit-0.3.0-draft/command.wit b/wit-0.3.0-draft/command.wit index 0310e51..13e92bd 100644 --- a/wit-0.3.0-draft/command.wit +++ b/wit-0.3.0-draft/command.wit @@ -1,10 +1,10 @@ -package wasi:cli@0.3.0; +package wasi:cli@0.3.0-rc-2025-08-15; -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) world command { - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) include imports; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) export run; } diff --git a/wit-0.3.0-draft/deps.lock b/wit-0.3.0-draft/deps.lock index 350728a..97759f3 100644 --- a/wit-0.3.0-draft/deps.lock +++ b/wit-0.3.0-draft/deps.lock @@ -1,23 +1,23 @@ [clocks] -sha256 = "26e315db0d371495f8834edfc0e479042f94152ce677d96d54d3623d0e4ffb1e" -sha512 = "e1c76f499435841316f9287b88d8173558e64f277c321ff390556de8707a0b18dd6c1749bbb17bbbba8d523da246ef6eb05c990ceddb762e03efb2ae30cacc76" +sha256 = "626953ec28ae956ec1233c4350deab6e5cdcbdd9ae6d491e102ad7c6901cc8bf" +sha512 = "ae375b002cfaacdbaa133bb87747d1b86675e13144067c3005d6c32cf5c37bb7a52b693ae46d5cd65fc4910a78d7255d0ada5142828a022497fd0eaacb61761f" [filesystem] url = "https://github.com/WebAssembly/wasi-filesystem/archive/main.tar.gz" subdir = "wit-0.3.0-draft" -sha256 = "f8a82b21e18cad3498b53475666a3f00c4c1b5f030b7ed47c79262e3dbe97461" -sha512 = "0e62fe9ff3ba0572d890a2edd969e88a5c2327279cec681d3f2688ed8442820333f6041b0f0956b44941f971a6afb785bd2f5248ca0c99b51f13521496cadbcc" +sha256 = "a65db475f8e41fa1701de4dc467ed748af5b807bdb2b5ff5027fefd0c0eab7a2" +sha512 = "3a797b5eacad135ed8e0a903c3db8f9073e79ecc547e31bf1ec62e9576e2069ecd2e37561674c000ab6cabf1cfeec5c32648b58c592bf52911c5783f179db83a" deps = ["clocks"] [random] url = "https://github.com/WebAssembly/wasi-random/archive/main.tar.gz" subdir = "wit-0.3.0-draft" -sha256 = "7a483077cc23fc9dc7a3f067d62795663cceee7dbbd23f205934282b1164a83e" -sha512 = "b99280fd60699f781f20209659e94c0058ce6b9e973ddbd0b8865d752f88c74633485d486d5a86b709385b6e60357470d1c6fbcb3a2769af210c0b1f52417506" +sha256 = "fcc4d3b51564274bb05ebd7cad65ff036eed5c1ac1316639e0c04aa0d64fc938" +sha512 = "d3b10e7791fc354730551f8e21beff96bdbf16f96ef655cd0ac7e0489a9e28c4a7a602d50b199de4a27981643bdbea7ec075cfa80ca351aea6ae74ea660b0568" [sockets] url = "https://github.com/WebAssembly/wasi-sockets/archive/main.tar.gz" subdir = "wit-0.3.0-draft" -sha256 = "a439ac477ff57f24331eb40989d50455b04cde0a12f235e88a5477614ea90264" -sha512 = "cf779c887fa401695215122621d7715aa5716f09dc94087887c93964fd454a146bc3b20c834e4a8e997ccb190910699a1a880e6caaaec25c32d941f9c26ba37f" +sha256 = "307e8459b8be0587000871d3f67fc04041e4cb1eb6c27e97183332fdb641926f" +sha512 = "183054d40082bf9e0fd38daf77df0189445c54384537548d5d37bc1b3cfd05190b1ca4377760a7108c39650785c74e5e230abd296e0fda8e2a5b263cd41f848b" deps = ["clocks"] diff --git a/wit-0.3.0-draft/deps/clocks/monotonic-clock.wit b/wit-0.3.0-draft/deps/clocks/monotonic-clock.wit index 87ebdaa..0c58241 100644 --- a/wit-0.3.0-draft/deps/clocks/monotonic-clock.wit +++ b/wit-0.3.0-draft/deps/clocks/monotonic-clock.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.3.0; +package wasi:clocks@0.3.0-rc-2025-08-15; /// WASI Monotonic Clock is a clock API intended to let users measure elapsed /// time. /// @@ -7,39 +7,39 @@ package wasi:clocks@0.3.0; /// /// A monotonic clock is a clock which has an unspecified initial value, and /// successive reads of the clock will produce non-decreasing values. -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface monotonic-clock { /// An instant in time, in nanoseconds. An instant is relative to an /// unspecified initial value, and can only be compared to instances from /// the same monotonic-clock. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) type instant = u64; /// A duration of time, in nanoseconds. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) type duration = u64; /// Read the current value of the clock. /// /// The clock is monotonic, therefore calling this function repeatedly will /// produce a sequence of non-decreasing values. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) now: func() -> instant; /// Query the resolution of the clock. Returns the duration of time /// corresponding to a clock tick. - @since(version = 0.3.0) - resolution: func() -> duration; + @since(version = 0.3.0-rc-2025-08-15) + get-resolution: func() -> duration; /// Wait until the specified instant has occurred. - @since(version = 0.3.0) - wait-until: func( + @since(version = 0.3.0-rc-2025-08-15) + wait-until: async func( when: instant, ); /// Wait for the specified duration has elapsed. - @since(version = 0.3.0) - wait-for: func( + @since(version = 0.3.0-rc-2025-08-15) + wait-for: async func( how-long: duration, ); } diff --git a/wit-0.3.0-draft/deps/clocks/timezone.wit b/wit-0.3.0-draft/deps/clocks/timezone.wit index ac91468..2ee16ab 100644 --- a/wit-0.3.0-draft/deps/clocks/timezone.wit +++ b/wit-0.3.0-draft/deps/clocks/timezone.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.3.0; +package wasi:clocks@0.3.0-rc-2025-08-15; @unstable(feature = clocks-timezone) interface timezone { diff --git a/wit-0.3.0-draft/deps/clocks/wall-clock.wit b/wit-0.3.0-draft/deps/clocks/wall-clock.wit index b7a85ab..2e3b2d4 100644 --- a/wit-0.3.0-draft/deps/clocks/wall-clock.wit +++ b/wit-0.3.0-draft/deps/clocks/wall-clock.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.3.0; +package wasi:clocks@0.3.0-rc-2025-08-15; /// WASI Wall Clock is a clock API intended to let users query the current /// time. The name "wall" makes an analogy to a "clock on the wall", which /// is not necessarily monotonic as it may be reset. @@ -13,10 +13,10 @@ package wasi:clocks@0.3.0; /// monotonic, making it unsuitable for measuring elapsed time. /// /// It is intended for reporting the current date and time for humans. -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface wall-clock { /// A time and date in seconds plus nanoseconds. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) record datetime { seconds: u64, nanoseconds: u32, @@ -35,12 +35,12 @@ interface wall-clock { /// /// [POSIX's Seconds Since the Epoch]: https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap04.html#tag_21_04_16 /// [Unix Time]: https://en.wikipedia.org/wiki/Unix_time - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) now: func() -> datetime; /// Query the resolution of the clock. /// /// The nanoseconds field of the output is always less than 1000000000. - @since(version = 0.3.0) - resolution: func() -> datetime; + @since(version = 0.3.0-rc-2025-08-15) + get-resolution: func() -> datetime; } diff --git a/wit-0.3.0-draft/deps/clocks/world.wit b/wit-0.3.0-draft/deps/clocks/world.wit index f97bcfe..94068c7 100644 --- a/wit-0.3.0-draft/deps/clocks/world.wit +++ b/wit-0.3.0-draft/deps/clocks/world.wit @@ -1,10 +1,10 @@ -package wasi:clocks@0.3.0; +package wasi:clocks@0.3.0-rc-2025-08-15; -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) world imports { - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import monotonic-clock; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import wall-clock; @unstable(feature = clocks-timezone) import timezone; diff --git a/wit-0.3.0-draft/deps/filesystem/preopens.wit b/wit-0.3.0-draft/deps/filesystem/preopens.wit index 0b29aae..b0f609a 100644 --- a/wit-0.3.0-draft/deps/filesystem/preopens.wit +++ b/wit-0.3.0-draft/deps/filesystem/preopens.wit @@ -1,11 +1,11 @@ -package wasi:filesystem@0.3.0; +package wasi:filesystem@0.3.0-rc-2025-08-15; -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface preopens { - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) use types.{descriptor}; /// Return the set of preopened directories, and their paths. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) get-directories: func() -> list>; } diff --git a/wit-0.3.0-draft/deps/filesystem/types.wit b/wit-0.3.0-draft/deps/filesystem/types.wit index af3cb25..07d770a 100644 --- a/wit-0.3.0-draft/deps/filesystem/types.wit +++ b/wit-0.3.0-draft/deps/filesystem/types.wit @@ -1,4 +1,4 @@ -package wasi:filesystem@0.3.0; +package wasi:filesystem@0.3.0-rc-2025-08-15; /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead. @@ -23,19 +23,19 @@ package wasi:filesystem@0.3.0; /// [WASI filesystem path resolution]. /// /// [WASI filesystem path resolution]: https://github.com/WebAssembly/wasi-filesystem/blob/main/path-resolution.md -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface types { - @since(version = 0.3.0) - use wasi:clocks/wall-clock@0.3.0.{datetime}; + @since(version = 0.3.0-rc-2025-08-15) + use wasi:clocks/wall-clock@0.3.0-rc-2025-08-15.{datetime}; /// File size or length of a region within a file. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) type filesize = u64; /// The type of a filesystem object referenced by a descriptor. /// /// Note: This was called `filetype` in earlier versions of WASI. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) enum descriptor-type { /// The type of the descriptor or file is unknown or is different from /// any of the other types specified. @@ -59,7 +59,7 @@ interface types { /// Descriptor flags. /// /// Note: This was called `fdflags` in earlier versions of WASI. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) flags descriptor-flags { /// Read mode: Data can be read. read, @@ -103,7 +103,7 @@ interface types { /// File attributes. /// /// Note: This was called `filestat` in earlier versions of WASI. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) record descriptor-stat { /// File type. %type: descriptor-type, @@ -130,7 +130,7 @@ interface types { } /// Flags determining the method of how paths are resolved. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) flags path-flags { /// As long as the resolved path corresponds to a symbolic link, it is /// expanded. @@ -138,7 +138,7 @@ interface types { } /// Open flags used by `open-at`. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) flags open-flags { /// Create file if it does not exist, similar to `O_CREAT` in POSIX. create, @@ -151,11 +151,11 @@ interface types { } /// Number of hard links to an inode. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) type link-count = u64; /// When setting a timestamp, this gives the value to set it to. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) variant new-timestamp { /// Leave the timestamp set to its previous value. no-change, @@ -255,7 +255,7 @@ interface types { } /// File or memory access pattern advisory information. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) enum advice { /// The application has no advice to give on its behavior with respect /// to the specified data. @@ -279,7 +279,7 @@ interface types { /// A 128-bit hash value, split into parts because wasm doesn't have a /// 128-bit integer type. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) record metadata-hash-value { /// 64 bits of a 128-bit hash value. lower: u64, @@ -290,18 +290,25 @@ interface types { /// A descriptor is a reference to a filesystem object, which may be a file, /// directory, named pipe, special file, or other object on which filesystem /// calls may be made. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) resource descriptor { /// Return a stream for reading from a file. /// /// Multiple read, write, and append streams may be active on the same open /// file and they do not interfere with each other. /// - /// This function returns a future, which will resolve to an error code if - /// reading full contents of the file fails. + /// This function returns a `stream` which provides the data received from the + /// file, and a `future` providing additional error information in case an + /// error is encountered. + /// + /// If no error is encountered, `stream.read` on the `stream` will return + /// `read-status::closed` with no `error-context` and the future resolves to + /// the value `ok`. If an error is encountered, `stream.read` on the + /// `stream` returns `read-status::closed` with an `error-context` and the future + /// resolves to `err` with an `error-code`. /// /// Note: This is similar to `pread` in POSIX. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) read-via-stream: func( /// The offset within the file at which to start reading. offset: filesize, @@ -319,8 +326,8 @@ interface types { /// written or an error is encountered. /// /// Note: This is similar to `pwrite` in POSIX. - @since(version = 0.3.0) - write-via-stream: func( + @since(version = 0.3.0-rc-2025-08-15) + write-via-stream: async func( /// Data to write data: stream, /// The offset within the file at which to start writing. @@ -335,14 +342,14 @@ interface types { /// written or an error is encountered. /// /// Note: This is similar to `write` with `O_APPEND` in POSIX. - @since(version = 0.3.0) - append-via-stream: func(data: stream) -> result<_, error-code>; + @since(version = 0.3.0-rc-2025-08-15) + append-via-stream: async func(data: stream) -> result<_, error-code>; /// Provide file advisory information on a descriptor. /// /// This is similar to `posix_fadvise` in POSIX. - @since(version = 0.3.0) - advise: func( + @since(version = 0.3.0-rc-2025-08-15) + advise: async func( /// The offset within the file to which the advisory applies. offset: filesize, /// The length of the region to which the advisory applies. @@ -357,8 +364,8 @@ interface types { /// opened for writing. /// /// Note: This is similar to `fdatasync` in POSIX. - @since(version = 0.3.0) - sync-data: func() -> result<_, error-code>; + @since(version = 0.3.0-rc-2025-08-15) + sync-data: async func() -> result<_, error-code>; /// Get flags associated with a descriptor. /// @@ -366,8 +373,8 @@ interface types { /// /// Note: This returns the value that was the `fs_flags` value returned /// from `fdstat_get` in earlier versions of WASI. - @since(version = 0.3.0) - get-flags: func() -> result; + @since(version = 0.3.0-rc-2025-08-15) + get-flags: async func() -> result; /// Get the dynamic type of a descriptor. /// @@ -379,23 +386,23 @@ interface types { /// /// Note: This returns the value that was the `fs_filetype` value returned /// from `fdstat_get` in earlier versions of WASI. - @since(version = 0.3.0) - get-type: func() -> result; + @since(version = 0.3.0-rc-2025-08-15) + get-type: async func() -> result; /// Adjust the size of an open file. If this increases the file's size, the /// extra bytes are filled with zeros. /// /// Note: This was called `fd_filestat_set_size` in earlier versions of WASI. - @since(version = 0.3.0) - set-size: func(size: filesize) -> result<_, error-code>; + @since(version = 0.3.0-rc-2025-08-15) + set-size: async func(size: filesize) -> result<_, error-code>; /// Adjust the timestamps of an open file or directory. /// /// Note: This is similar to `futimens` in POSIX. /// /// Note: This was called `fd_filestat_set_times` in earlier versions of WASI. - @since(version = 0.3.0) - set-times: func( + @since(version = 0.3.0-rc-2025-08-15) + set-times: async func( /// The desired values of the data access timestamp. data-access-timestamp: new-timestamp, /// The desired values of the data modification timestamp. @@ -414,8 +421,8 @@ interface types { /// /// This function returns a future, which will resolve to an error code if /// reading full contents of the directory fails. - @since(version = 0.3.0) - read-directory: func() -> tuple, future>>; + @since(version = 0.3.0-rc-2025-08-15) + read-directory: async func() -> tuple, future>>; /// Synchronize the data and metadata of a file to disk. /// @@ -423,14 +430,14 @@ interface types { /// opened for writing. /// /// Note: This is similar to `fsync` in POSIX. - @since(version = 0.3.0) - sync: func() -> result<_, error-code>; + @since(version = 0.3.0-rc-2025-08-15) + sync: async func() -> result<_, error-code>; /// Create a directory. /// /// Note: This is similar to `mkdirat` in POSIX. - @since(version = 0.3.0) - create-directory-at: func( + @since(version = 0.3.0-rc-2025-08-15) + create-directory-at: async func( /// The relative path at which to create the directory. path: string, ) -> result<_, error-code>; @@ -444,8 +451,8 @@ interface types { /// modified, use `metadata-hash`. /// /// Note: This was called `fd_filestat_get` in earlier versions of WASI. - @since(version = 0.3.0) - stat: func() -> result; + @since(version = 0.3.0-rc-2025-08-15) + stat: async func() -> result; /// Return the attributes of a file or directory. /// @@ -454,8 +461,8 @@ interface types { /// discussion of alternatives. /// /// Note: This was called `path_filestat_get` in earlier versions of WASI. - @since(version = 0.3.0) - stat-at: func( + @since(version = 0.3.0-rc-2025-08-15) + stat-at: async func( /// Flags determining the method of how the path is resolved. path-flags: path-flags, /// The relative path of the file or directory to inspect. @@ -468,8 +475,8 @@ interface types { /// /// Note: This was called `path_filestat_set_times` in earlier versions of /// WASI. - @since(version = 0.3.0) - set-times-at: func( + @since(version = 0.3.0-rc-2025-08-15) + set-times-at: async func( /// Flags determining the method of how the path is resolved. path-flags: path-flags, /// The relative path of the file or directory to operate on. @@ -487,8 +494,8 @@ interface types { /// `error-code::not-permitted` if the old path is not a file. /// /// Note: This is similar to `linkat` in POSIX. - @since(version = 0.3.0) - link-at: func( + @since(version = 0.3.0-rc-2025-08-15) + link-at: async func( /// Flags determining the method of how the path is resolved. old-path-flags: path-flags, /// The relative source path from which to link. @@ -511,8 +518,8 @@ interface types { /// `error-code::read-only`. /// /// Note: This is similar to `openat` in POSIX. - @since(version = 0.3.0) - open-at: func( + @since(version = 0.3.0-rc-2025-08-15) + open-at: async func( /// Flags determining the method of how the path is resolved. path-flags: path-flags, /// The relative path of the object to open. @@ -529,8 +536,8 @@ interface types { /// filesystem, this function fails with `error-code::not-permitted`. /// /// Note: This is similar to `readlinkat` in POSIX. - @since(version = 0.3.0) - readlink-at: func( + @since(version = 0.3.0-rc-2025-08-15) + readlink-at: async func( /// The relative path of the symbolic link from which to read. path: string, ) -> result; @@ -540,8 +547,8 @@ interface types { /// Return `error-code::not-empty` if the directory is not empty. /// /// Note: This is similar to `unlinkat(fd, path, AT_REMOVEDIR)` in POSIX. - @since(version = 0.3.0) - remove-directory-at: func( + @since(version = 0.3.0-rc-2025-08-15) + remove-directory-at: async func( /// The relative path to a directory to remove. path: string, ) -> result<_, error-code>; @@ -549,8 +556,8 @@ interface types { /// Rename a filesystem object. /// /// Note: This is similar to `renameat` in POSIX. - @since(version = 0.3.0) - rename-at: func( + @since(version = 0.3.0-rc-2025-08-15) + rename-at: async func( /// The relative source path of the file or directory to rename. old-path: string, /// The base directory for `new-path`. @@ -565,8 +572,8 @@ interface types { /// `error-code::not-permitted`. /// /// Note: This is similar to `symlinkat` in POSIX. - @since(version = 0.3.0) - symlink-at: func( + @since(version = 0.3.0-rc-2025-08-15) + symlink-at: async func( /// The contents of the symbolic link. old-path: string, /// The relative destination path at which to create the symbolic link. @@ -577,8 +584,8 @@ interface types { /// /// Return `error-code::is-directory` if the path refers to a directory. /// Note: This is similar to `unlinkat(fd, path, 0)` in POSIX. - @since(version = 0.3.0) - unlink-file-at: func( + @since(version = 0.3.0-rc-2025-08-15) + unlink-file-at: async func( /// The relative path to a file to unlink. path: string, ) -> result<_, error-code>; @@ -589,8 +596,8 @@ interface types { /// same device (`st_dev`) and inode (`st_ino` or `d_ino`) numbers. /// wasi-filesystem does not expose device and inode numbers, so this function /// may be used instead. - @since(version = 0.3.0) - is-same-object: func(other: borrow) -> bool; + @since(version = 0.3.0-rc-2025-08-15) + is-same-object: async func(other: borrow) -> bool; /// Return a hash of the metadata associated with a filesystem object referred /// to by a descriptor. @@ -611,15 +618,15 @@ interface types { /// computed hash. /// /// However, none of these is required. - @since(version = 0.3.0) - metadata-hash: func() -> result; + @since(version = 0.3.0-rc-2025-08-15) + metadata-hash: async func() -> result; /// Return a hash of the metadata associated with a filesystem object referred /// to by a directory descriptor and a relative path. /// /// This performs the same hash computation as `metadata-hash`. - @since(version = 0.3.0) - metadata-hash-at: func( + @since(version = 0.3.0-rc-2025-08-15) + metadata-hash-at: async func( /// Flags determining the method of how the path is resolved. path-flags: path-flags, /// The relative path of the file or directory to inspect. diff --git a/wit-0.3.0-draft/deps/filesystem/world.wit b/wit-0.3.0-draft/deps/filesystem/world.wit index c0ab32a..b9dcfd5 100644 --- a/wit-0.3.0-draft/deps/filesystem/world.wit +++ b/wit-0.3.0-draft/deps/filesystem/world.wit @@ -1,9 +1,9 @@ -package wasi:filesystem@0.3.0; +package wasi:filesystem@0.3.0-rc-2025-08-15; -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) world imports { - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import types; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import preopens; } diff --git a/wit-0.3.0-draft/deps/random/insecure-seed.wit b/wit-0.3.0-draft/deps/random/insecure-seed.wit index 4708d90..ecd5043 100644 --- a/wit-0.3.0-draft/deps/random/insecure-seed.wit +++ b/wit-0.3.0-draft/deps/random/insecure-seed.wit @@ -1,9 +1,9 @@ -package wasi:random@0.3.0; +package wasi:random@0.3.0-rc-2025-08-15; /// The insecure-seed interface for seeding hash-map DoS resistance. /// /// It is intended to be portable at least between Unix-family platforms and /// Windows. -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface insecure-seed { /// Return a 128-bit value that may contain a pseudo-random value. /// @@ -22,6 +22,6 @@ interface insecure-seed { /// This will likely be changed to a value import, to prevent it from being /// called multiple times and potentially used for purposes other than DoS /// protection. - @since(version = 0.3.0) - insecure-seed: func() -> tuple; + @since(version = 0.3.0-rc-2025-08-15) + get-insecure-seed: func() -> tuple; } diff --git a/wit-0.3.0-draft/deps/random/insecure.wit b/wit-0.3.0-draft/deps/random/insecure.wit index 4ea5e58..d08d85e 100644 --- a/wit-0.3.0-draft/deps/random/insecure.wit +++ b/wit-0.3.0-draft/deps/random/insecure.wit @@ -1,9 +1,9 @@ -package wasi:random@0.3.0; +package wasi:random@0.3.0-rc-2025-08-15; /// The insecure interface for insecure pseudo-random numbers. /// /// It is intended to be portable at least between Unix-family platforms and /// Windows. -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface insecure { /// Return `len` insecure pseudo-random bytes. /// @@ -13,13 +13,13 @@ interface insecure { /// There are no requirements on the values of the returned bytes, however /// implementations are encouraged to return evenly distributed values with /// a long period. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) get-insecure-random-bytes: func(len: u64) -> list; /// Return an insecure pseudo-random `u64` value. /// /// This function returns the same type of pseudo-random data as /// `get-insecure-random-bytes`, represented as a `u64`. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) get-insecure-random-u64: func() -> u64; } diff --git a/wit-0.3.0-draft/deps/random/random.wit b/wit-0.3.0-draft/deps/random/random.wit index 786ef25..3808c30 100644 --- a/wit-0.3.0-draft/deps/random/random.wit +++ b/wit-0.3.0-draft/deps/random/random.wit @@ -1,9 +1,9 @@ -package wasi:random@0.3.0; +package wasi:random@0.3.0-rc-2025-08-15; /// WASI Random is a random data API. /// /// It is intended to be portable at least between Unix-family platforms and /// Windows. -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface random { /// Return `len` cryptographically-secure random or pseudo-random bytes. /// @@ -17,13 +17,13 @@ interface random { /// This function must always return fresh data. Deterministic environments /// must omit this function, rather than implementing it with deterministic /// data. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) get-random-bytes: func(len: u64) -> list; /// Return a cryptographically-secure random or pseudo-random `u64` value. /// /// This function returns the same type of data as `get-random-bytes`, /// represented as a `u64`. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) get-random-u64: func() -> u64; } diff --git a/wit-0.3.0-draft/deps/random/world.wit b/wit-0.3.0-draft/deps/random/world.wit index 838d380..e8f05cc 100644 --- a/wit-0.3.0-draft/deps/random/world.wit +++ b/wit-0.3.0-draft/deps/random/world.wit @@ -1,13 +1,13 @@ -package wasi:random@0.3.0; +package wasi:random@0.3.0-rc-2025-08-15; -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) world imports { - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import random; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import insecure; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import insecure-seed; } diff --git a/wit-0.3.0-draft/deps/sockets/ip-name-lookup.wit b/wit-0.3.0-draft/deps/sockets/ip-name-lookup.wit index 7cc8b03..ab4156e 100644 --- a/wit-0.3.0-draft/deps/sockets/ip-name-lookup.wit +++ b/wit-0.3.0-draft/deps/sockets/ip-name-lookup.wit @@ -1,10 +1,10 @@ -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface ip-name-lookup { - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) use types.{ip-address}; /// Lookup error codes. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) enum error-code { /// Unknown error unknown, @@ -57,6 +57,6 @@ interface ip-name-lookup { /// - /// - /// - - @since(version = 0.3.0) - resolve-addresses: func(name: string) -> result, error-code>; + @since(version = 0.3.0-rc-2025-08-15) + resolve-addresses: async func(name: string) -> result, error-code>; } diff --git a/wit-0.3.0-draft/deps/sockets/types.wit b/wit-0.3.0-draft/deps/sockets/types.wit index 456d4e5..3a7915c 100644 --- a/wit-0.3.0-draft/deps/sockets/types.wit +++ b/wit-0.3.0-draft/deps/sockets/types.wit @@ -1,7 +1,7 @@ -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface types { - @since(version = 0.3.0) - use wasi:clocks/monotonic-clock@0.3.0.{duration}; + @since(version = 0.3.0-rc-2025-08-15) + use wasi:clocks/monotonic-clock@0.3.0-rc-2025-08-15.{duration}; /// Error codes. /// @@ -14,7 +14,7 @@ interface types { /// - `out-of-memory` /// /// See each individual API for what the POSIX equivalents are. They sometimes differ per API. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) enum error-code { /// Unknown error unknown, @@ -70,7 +70,7 @@ interface types { datagram-too-large, } - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) enum ip-address-family { /// Similar to `AF_INET` in POSIX. ipv4, @@ -79,18 +79,18 @@ interface types { ipv6, } - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) type ipv4-address = tuple; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) type ipv6-address = tuple; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) variant ip-address { ipv4(ipv4-address), ipv6(ipv6-address), } - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) record ipv4-socket-address { /// sin_port port: u16, @@ -98,7 +98,7 @@ interface types { address: ipv4-address, } - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) record ipv6-socket-address { /// sin6_port port: u16, @@ -110,7 +110,7 @@ interface types { scope-id: u32, } - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) variant ip-socket-address { ipv4(ipv4-socket-address), ipv6(ipv6-socket-address), @@ -125,7 +125,7 @@ interface types { /// - `connecting` /// - `connected` /// - `closed` - /// See + /// See /// for more information. /// /// Note: Except where explicitly mentioned, whenever this documentation uses @@ -135,7 +135,7 @@ interface types { /// In addition to the general error codes documented on the /// `types::error-code` type, TCP socket methods may always return /// `error(invalid-state)` when in the `closed` state. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) resource tcp-socket { /// Create a new TCP socket. @@ -152,8 +152,8 @@ interface types { /// - /// - /// - - @since(version = 0.3.0) - constructor(address-family: ip-address-family); + @since(version = 0.3.0-rc-2025-08-15) + create: static func(address-family: ip-address-family) -> result; /// Bind the socket to the provided IP address and port. /// @@ -186,7 +186,7 @@ interface types { /// - /// - /// - - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) bind: func(local-address: ip-socket-address) -> result<_, error-code>; /// Connect to a remote endpoint. @@ -218,10 +218,10 @@ interface types { /// - /// - /// - - @since(version = 0.3.0) - connect: func(remote-address: ip-socket-address) -> result<_, error-code>; + @since(version = 0.3.0-rc-2025-08-15) + connect: async func(remote-address: ip-socket-address) -> result<_, error-code>; - /// Start listening return a stream of new inbound connections. + /// Start listening and return a stream of new inbound connections. /// /// Transitions the socket into the `listening` state. This can be called /// at most once per socket. @@ -285,7 +285,7 @@ interface types { /// - /// - /// - - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) listen: func() -> result, error-code>; /// Transmit data to peer. @@ -308,8 +308,8 @@ interface types { /// - /// - /// - - @since(version = 0.3.0) - send: func(data: stream) -> result<_, error-code>; + @since(version = 0.3.0-rc-2025-08-15) + send: async func(data: stream) -> result<_, error-code>; /// Read data from peer. /// @@ -342,7 +342,7 @@ interface types { /// - /// - /// - - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) receive: func() -> tuple, future>>; /// Get the bound local address. @@ -351,7 +351,7 @@ interface types { /// > If the socket has not been bound to a local name, the value /// > stored in the object pointed to by `address` is unspecified. /// - /// WASI is stricter and requires `local-address` to return `invalid-state` when the socket hasn't been bound yet. + /// WASI is stricter and requires `get-local-address` to return `invalid-state` when the socket hasn't been bound yet. /// /// # Typical errors /// - `invalid-state`: The socket is not bound to any local address. @@ -361,8 +361,8 @@ interface types { /// - /// - /// - - @since(version = 0.3.0) - local-address: func() -> result; + @since(version = 0.3.0-rc-2025-08-15) + get-local-address: func() -> result; /// Get the remote address. /// @@ -374,22 +374,22 @@ interface types { /// - /// - /// - - @since(version = 0.3.0) - remote-address: func() -> result; + @since(version = 0.3.0-rc-2025-08-15) + get-remote-address: func() -> result; /// Whether the socket is in the `listening` state. /// /// Equivalent to the SO_ACCEPTCONN socket option. - @since(version = 0.3.0) - is-listening: func() -> bool; + @since(version = 0.3.0-rc-2025-08-15) + get-is-listening: func() -> bool; /// Whether this is a IPv4 or IPv6 socket. /// /// This is the value passed to the constructor. /// /// Equivalent to the SO_DOMAIN socket option. - @since(version = 0.3.0) - address-family: func() -> ip-address-family; + @since(version = 0.3.0-rc-2025-08-15) + get-address-family: func() -> ip-address-family; /// Hints the desired listen queue size. Implementations are free to ignore this. /// @@ -400,7 +400,7 @@ interface types { /// - `not-supported`: (set) The platform does not support changing the backlog size after the initial listen. /// - `invalid-argument`: (set) The provided value was 0. /// - `invalid-state`: (set) The socket is in the `connecting` or `connected` state. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) set-listen-backlog-size: func(value: u64) -> result<_, error-code>; /// Enables or disables keepalive. @@ -412,9 +412,9 @@ interface types { /// These properties can be configured while `keep-alive-enabled` is false, but only come into effect when `keep-alive-enabled` is true. /// /// Equivalent to the SO_KEEPALIVE socket option. - @since(version = 0.3.0) - keep-alive-enabled: func() -> result; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) + get-keep-alive-enabled: func() -> result; + @since(version = 0.3.0-rc-2025-08-15) set-keep-alive-enabled: func(value: bool) -> result<_, error-code>; /// Amount of time the connection has to be idle before TCP starts sending keepalive packets. @@ -427,9 +427,9 @@ interface types { /// /// # Typical errors /// - `invalid-argument`: (set) The provided value was 0. - @since(version = 0.3.0) - keep-alive-idle-time: func() -> result; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) + get-keep-alive-idle-time: func() -> result; + @since(version = 0.3.0-rc-2025-08-15) set-keep-alive-idle-time: func(value: duration) -> result<_, error-code>; /// The time between keepalive packets. @@ -442,9 +442,9 @@ interface types { /// /// # Typical errors /// - `invalid-argument`: (set) The provided value was 0. - @since(version = 0.3.0) - keep-alive-interval: func() -> result; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) + get-keep-alive-interval: func() -> result; + @since(version = 0.3.0-rc-2025-08-15) set-keep-alive-interval: func(value: duration) -> result<_, error-code>; /// The maximum amount of keepalive packets TCP should send before aborting the connection. @@ -457,9 +457,9 @@ interface types { /// /// # Typical errors /// - `invalid-argument`: (set) The provided value was 0. - @since(version = 0.3.0) - keep-alive-count: func() -> result; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) + get-keep-alive-count: func() -> result; + @since(version = 0.3.0-rc-2025-08-15) set-keep-alive-count: func(value: u32) -> result<_, error-code>; /// Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options. @@ -468,9 +468,9 @@ interface types { /// /// # Typical errors /// - `invalid-argument`: (set) The TTL value must be 1 or higher. - @since(version = 0.3.0) - hop-limit: func() -> result; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) + get-hop-limit: func() -> result; + @since(version = 0.3.0-rc-2025-08-15) set-hop-limit: func(value: u8) -> result<_, error-code>; /// The kernel buffer space reserved for sends/receives on this socket. @@ -483,18 +483,18 @@ interface types { /// /// # Typical errors /// - `invalid-argument`: (set) The provided value was 0. - @since(version = 0.3.0) - receive-buffer-size: func() -> result; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) + get-receive-buffer-size: func() -> result; + @since(version = 0.3.0-rc-2025-08-15) set-receive-buffer-size: func(value: u64) -> result<_, error-code>; - @since(version = 0.3.0) - send-buffer-size: func() -> result; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) + get-send-buffer-size: func() -> result; + @since(version = 0.3.0-rc-2025-08-15) set-send-buffer-size: func(value: u64) -> result<_, error-code>; } /// A UDP socket handle. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) resource udp-socket { /// Create a new UDP socket. @@ -511,8 +511,8 @@ interface types { /// - /// - /// - - @since(version = 0.3.0) - constructor(address-family: ip-address-family); + @since(version = 0.3.0-rc-2025-08-15) + create: static func(address-family: ip-address-family) -> result; /// Bind the socket to the provided IP address and port. /// @@ -532,7 +532,7 @@ interface types { /// - /// - /// - - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) bind: func(local-address: ip-socket-address) -> result<_, error-code>; /// Associate this socket with a specific peer address. @@ -571,7 +571,7 @@ interface types { /// - /// - /// - - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) connect: func(remote-address: ip-socket-address) -> result<_, error-code>; /// Dissociate this socket from its peer address. @@ -589,7 +589,7 @@ interface types { /// - /// - /// - - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) disconnect: func() -> result<_, error-code>; /// Send a message on the socket to a particular peer. @@ -623,8 +623,8 @@ interface types { /// - /// - /// - - @since(version = 0.3.0) - send: func(data: list, remote-address: option) -> result<_, error-code>; + @since(version = 0.3.0-rc-2025-08-15) + send: async func(data: list, remote-address: option) -> result<_, error-code>; /// Receive a message on the socket. /// @@ -649,8 +649,8 @@ interface types { /// - /// - /// - - @since(version = 0.3.0) - receive: func() -> result, ip-socket-address>, error-code>; + @since(version = 0.3.0-rc-2025-08-15) + receive: async func() -> result, ip-socket-address>, error-code>; /// Get the current bound address. /// @@ -658,7 +658,7 @@ interface types { /// > If the socket has not been bound to a local name, the value /// > stored in the object pointed to by `address` is unspecified. /// - /// WASI is stricter and requires `local-address` to return `invalid-state` when the socket hasn't been bound yet. + /// WASI is stricter and requires `get-local-address` to return `invalid-state` when the socket hasn't been bound yet. /// /// # Typical errors /// - `invalid-state`: The socket is not bound to any local address. @@ -668,8 +668,8 @@ interface types { /// - /// - /// - - @since(version = 0.3.0) - local-address: func() -> result; + @since(version = 0.3.0-rc-2025-08-15) + get-local-address: func() -> result; /// Get the address the socket is currently "connected" to. /// @@ -681,16 +681,16 @@ interface types { /// - /// - /// - - @since(version = 0.3.0) - remote-address: func() -> result; + @since(version = 0.3.0-rc-2025-08-15) + get-remote-address: func() -> result; /// Whether this is a IPv4 or IPv6 socket. /// /// This is the value passed to the constructor. /// /// Equivalent to the SO_DOMAIN socket option. - @since(version = 0.3.0) - address-family: func() -> ip-address-family; + @since(version = 0.3.0-rc-2025-08-15) + get-address-family: func() -> ip-address-family; /// Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options. /// @@ -698,9 +698,9 @@ interface types { /// /// # Typical errors /// - `invalid-argument`: (set) The TTL value must be 1 or higher. - @since(version = 0.3.0) - unicast-hop-limit: func() -> result; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) + get-unicast-hop-limit: func() -> result; + @since(version = 0.3.0-rc-2025-08-15) set-unicast-hop-limit: func(value: u8) -> result<_, error-code>; /// The kernel buffer space reserved for sends/receives on this socket. @@ -713,13 +713,13 @@ interface types { /// /// # Typical errors /// - `invalid-argument`: (set) The provided value was 0. - @since(version = 0.3.0) - receive-buffer-size: func() -> result; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) + get-receive-buffer-size: func() -> result; + @since(version = 0.3.0-rc-2025-08-15) set-receive-buffer-size: func(value: u64) -> result<_, error-code>; - @since(version = 0.3.0) - send-buffer-size: func() -> result; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) + get-send-buffer-size: func() -> result; + @since(version = 0.3.0-rc-2025-08-15) set-send-buffer-size: func(value: u64) -> result<_, error-code>; } } diff --git a/wit-0.3.0-draft/deps/sockets/world.wit b/wit-0.3.0-draft/deps/sockets/world.wit index 6c9951d..dfafac2 100644 --- a/wit-0.3.0-draft/deps/sockets/world.wit +++ b/wit-0.3.0-draft/deps/sockets/world.wit @@ -1,9 +1,9 @@ -package wasi:sockets@0.3.0; +package wasi:sockets@0.3.0-rc-2025-08-15; -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) world imports { - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import types; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import ip-name-lookup; } diff --git a/wit-0.3.0-draft/environment.wit b/wit-0.3.0-draft/environment.wit index fb14eee..769858a 100644 --- a/wit-0.3.0-draft/environment.wit +++ b/wit-0.3.0-draft/environment.wit @@ -1,4 +1,4 @@ -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface environment { /// Get the POSIX-style environment variables. /// @@ -8,15 +8,15 @@ interface environment { /// Morally, these are a value import, but until value imports are available /// in the component model, this import function should return the same /// values each time it is called. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) get-environment: func() -> list>; /// Get the POSIX-style arguments to the program. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) get-arguments: func() -> list; /// Return a path that programs should use as their initial current working /// directory, interpreting `.` as shorthand for this. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) get-initial-cwd: func() -> option; } diff --git a/wit-0.3.0-draft/exit.wit b/wit-0.3.0-draft/exit.wit index e799a95..dcf791a 100644 --- a/wit-0.3.0-draft/exit.wit +++ b/wit-0.3.0-draft/exit.wit @@ -1,7 +1,7 @@ -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface exit { /// Exit the current instance and any linked instances. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) exit: func(status: result); /// Exit the current instance and any linked instances, reporting the diff --git a/wit-0.3.0-draft/imports.wit b/wit-0.3.0-draft/imports.wit index 5dbc2ed..2d513ea 100644 --- a/wit-0.3.0-draft/imports.wit +++ b/wit-0.3.0-draft/imports.wit @@ -1,34 +1,34 @@ -package wasi:cli@0.3.0; +package wasi:cli@0.3.0-rc-2025-08-15; -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) world imports { - @since(version = 0.3.0) - include wasi:clocks/imports@0.3.0; - @since(version = 0.3.0) - include wasi:filesystem/imports@0.3.0; - @since(version = 0.3.0) - include wasi:sockets/imports@0.3.0; - @since(version = 0.3.0) - include wasi:random/imports@0.3.0; + @since(version = 0.3.0-rc-2025-08-15) + include wasi:clocks/imports@0.3.0-rc-2025-08-15; + @since(version = 0.3.0-rc-2025-08-15) + include wasi:filesystem/imports@0.3.0-rc-2025-08-15; + @since(version = 0.3.0-rc-2025-08-15) + include wasi:sockets/imports@0.3.0-rc-2025-08-15; + @since(version = 0.3.0-rc-2025-08-15) + include wasi:random/imports@0.3.0-rc-2025-08-15; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import environment; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import exit; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import stdin; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import stdout; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import stderr; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import terminal-input; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import terminal-output; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import terminal-stdin; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import terminal-stdout; - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) import terminal-stderr; } diff --git a/wit-0.3.0-draft/run.wit b/wit-0.3.0-draft/run.wit index 6dd8b68..6149db7 100644 --- a/wit-0.3.0-draft/run.wit +++ b/wit-0.3.0-draft/run.wit @@ -1,6 +1,6 @@ -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface run { /// Run the program. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) run: func() -> result; } diff --git a/wit-0.3.0-draft/stdio.wit b/wit-0.3.0-draft/stdio.wit index 6a1208f..6c99a56 100644 --- a/wit-0.3.0-draft/stdio.wit +++ b/wit-0.3.0-draft/stdio.wit @@ -1,17 +1,17 @@ -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface stdin { - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) get-stdin: func() -> stream; } -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface stdout { - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) set-stdout: func(data: stream); } -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface stderr { - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) set-stderr: func(data: stream); } diff --git a/wit-0.3.0-draft/terminal.wit b/wit-0.3.0-draft/terminal.wit index c37184f..3b2b72b 100644 --- a/wit-0.3.0-draft/terminal.wit +++ b/wit-0.3.0-draft/terminal.wit @@ -3,10 +3,10 @@ /// 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. -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface terminal-input { /// The input side of a terminal. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) resource terminal-input; } @@ -15,48 +15,48 @@ interface terminal-input { /// In the future, this may include functions for querying the terminal /// size, being notified of terminal size changes, querying supported /// features, and so on. -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface terminal-output { /// The output side of a terminal. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) resource terminal-output; } /// An interface providing an optional `terminal-input` for stdin as a /// link-time authority. -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface terminal-stdin { - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) use terminal-input.{terminal-input}; /// If stdin is connected to a terminal, return a `terminal-input` handle /// allowing further interaction with it. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) get-terminal-stdin: func() -> option; } /// An interface providing an optional `terminal-output` for stdout as a /// link-time authority. -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface terminal-stdout { - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) use terminal-output.{terminal-output}; /// If stdout is connected to a terminal, return a `terminal-output` handle /// allowing further interaction with it. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) get-terminal-stdout: func() -> option; } /// An interface providing an optional `terminal-output` for stderr as a /// link-time authority. -@since(version = 0.3.0) +@since(version = 0.3.0-rc-2025-08-15) interface terminal-stderr { - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) use terminal-output.{terminal-output}; /// If stderr is connected to a terminal, return a `terminal-output` handle /// allowing further interaction with it. - @since(version = 0.3.0) + @since(version = 0.3.0-rc-2025-08-15) get-terminal-stderr: func() -> option; }