Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions wit-0.3.0-draft/command.wit
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package wasi:cli@0.3.0-rc-2025-08-15;
package wasi:cli@0.3.0-rc-2025-09-16;

@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
world command {
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
include imports;

@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
export run;
}
4 changes: 2 additions & 2 deletions wit-0.3.0-draft/deps.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ deps = ["clocks"]
[random]
url = "https://github.com/WebAssembly/wasi-random/archive/main.tar.gz"
subdir = "wit-0.3.0-draft"
sha256 = "fcc4d3b51564274bb05ebd7cad65ff036eed5c1ac1316639e0c04aa0d64fc938"
sha512 = "d3b10e7791fc354730551f8e21beff96bdbf16f96ef655cd0ac7e0489a9e28c4a7a602d50b199de4a27981643bdbea7ec075cfa80ca351aea6ae74ea660b0568"
sha256 = "45a5fa540deaf386de72bcf53c4462901919532e6dc1a80226c117a0d6e7c5e5"
sha512 = "984b48f604992236530c190b00de9feba45f908b83a0dad31b6a1c117b6146bdfc838f4669d23763604a464bc6b980e35c07943e1bc22305e94a87c6acc51e5a"

[sockets]
url = "https://github.com/WebAssembly/wasi-sockets/archive/main.tar.gz"
Expand Down
6 changes: 3 additions & 3 deletions wit-0.3.0-draft/deps/random/insecure-seed.wit
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package wasi:random@0.3.0-rc-2025-08-15;
package wasi:random@0.3.0-rc-2025-09-16-1;
/// 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-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16-1)
interface insecure-seed {
/// Return a 128-bit value that may contain a pseudo-random value.
///
Expand All @@ -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-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16-1)
get-insecure-seed: func() -> tuple<u64, u64>;
}
8 changes: 4 additions & 4 deletions wit-0.3.0-draft/deps/random/insecure.wit
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package wasi:random@0.3.0-rc-2025-08-15;
package wasi:random@0.3.0-rc-2025-09-16-1;
/// 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-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16-1)
interface insecure {
/// Return `len` insecure pseudo-random bytes.
///
Expand All @@ -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-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16-1)
get-insecure-random-bytes: func(len: u64) -> list<u8>;

/// 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-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16-1)
get-insecure-random-u64: func() -> u64;
}
8 changes: 4 additions & 4 deletions wit-0.3.0-draft/deps/random/random.wit
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package wasi:random@0.3.0-rc-2025-08-15;
package wasi:random@0.3.0-rc-2025-09-16-1;
/// 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-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16-1)
interface random {
/// Return `len` cryptographically-secure random or pseudo-random bytes.
///
Expand All @@ -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-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16-1)
get-random-bytes: func(len: u64) -> list<u8>;

/// 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-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16-1)
get-random-u64: func() -> u64;
}
10 changes: 5 additions & 5 deletions wit-0.3.0-draft/deps/random/world.wit
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package wasi:random@0.3.0-rc-2025-08-15;
package wasi:random@0.3.0-rc-2025-09-16-1;

@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16-1)
world imports {
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16-1)
import random;

@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16-1)
import insecure;

@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16-1)
import insecure-seed;
}
8 changes: 4 additions & 4 deletions wit-0.3.0-draft/environment.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
interface environment {
/// Get the POSIX-style environment variables.
///
Expand All @@ -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-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
get-environment: func() -> list<tuple<string, string>>;

/// Get the POSIX-style arguments to the program.
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
get-arguments: func() -> list<string>;

/// Return a path that programs should use as their initial current working
/// directory, interpreting `.` as shorthand for this.
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
get-initial-cwd: func() -> option<string>;
}
4 changes: 2 additions & 2 deletions wit-0.3.0-draft/exit.wit
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
interface exit {
/// Exit the current instance and any linked instances.
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
exit: func(status: result);

/// Exit the current instance and any linked instances, reporting the
Expand Down
40 changes: 20 additions & 20 deletions wit-0.3.0-draft/imports.wit
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
package wasi:cli@0.3.0-rc-2025-08-15;
package wasi:cli@0.3.0-rc-2025-09-16;

@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
world imports {
@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-rc-2025-09-16)
include wasi:clocks/imports@0.3.0-rc-2025-09-16;
@since(version = 0.3.0-rc-2025-09-16)
include wasi:filesystem/imports@0.3.0-rc-2025-09-16;
@since(version = 0.3.0-rc-2025-09-16)
include wasi:sockets/imports@0.3.0-rc-2025-09-16;
@since(version = 0.3.0-rc-2025-09-16)
include wasi:random/imports@0.3.0-rc-2025-09-16;

@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
import environment;
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
import exit;
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
import stdin;
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
import stdout;
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
import stderr;
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
import terminal-input;
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
import terminal-output;
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
import terminal-stdin;
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
import terminal-stdout;
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
import terminal-stderr;
}
4 changes: 2 additions & 2 deletions wit-0.3.0-draft/run.wit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
interface run {
/// Run the program.
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
run: async func() -> result;
}
16 changes: 8 additions & 8 deletions wit-0.3.0-draft/stdio.wit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
interface types {
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
enum error-code {
/// Input/output error
io,
Expand All @@ -11,7 +11,7 @@ interface types {
}
}

@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
interface stdin {
use types.{error-code};

Expand All @@ -28,11 +28,11 @@ interface stdin {
///
/// Multiple streams may be active at the same time. The behavior of concurrent
/// reads is implementation-specific.
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
read-via-stream: func() -> tuple<stream<u8>, future<result<_, error-code>>>;
}

@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
interface stdout {
use types.{error-code};

Expand All @@ -44,11 +44,11 @@ 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-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
write-via-stream: async func(data: stream<u8>) -> result<_, error-code>;
}

@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
interface stderr {
use types.{error-code};

Expand All @@ -60,6 +60,6 @@ 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-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
write-via-stream: async func(data: stream<u8>) -> result<_, error-code>;
}
26 changes: 13 additions & 13 deletions wit-0.3.0-draft/terminal.wit
Original file line number Diff line number Diff line change
Expand Up @@ -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-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
interface terminal-input {
/// The input side of a terminal.
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
resource terminal-input;
}

Expand All @@ -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-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
interface terminal-output {
/// The output side of a terminal.
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
resource terminal-output;
}

/// An interface providing an optional `terminal-input` for stdin as a
/// link-time authority.
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
interface terminal-stdin {
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
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-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
get-terminal-stdin: func() -> option<terminal-input>;
}

/// An interface providing an optional `terminal-output` for stdout as a
/// link-time authority.
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
interface terminal-stdout {
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
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-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
get-terminal-stdout: func() -> option<terminal-output>;
}

/// An interface providing an optional `terminal-output` for stderr as a
/// link-time authority.
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
interface terminal-stderr {
@since(version = 0.3.0-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
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-rc-2025-08-15)
@since(version = 0.3.0-rc-2025-09-16)
get-terminal-stderr: func() -> option<terminal-output>;
}