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
4 changes: 2 additions & 2 deletions wit-0.3.0-draft/deps.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[clocks]
url = "https://github.com/WebAssembly/wasi-clocks/archive/main.tar.gz"
subdir = "wit-0.3.0-draft"
sha256 = "d0257e056a4061eaab58a934d84b4b35534d90866667054e886da65c170aeef6"
sha512 = "b033cd0171d9d0c908b17f98f792e47eaeee7534d4bca664c62bdab6f48a8046179e068d4ef11d1e333d3ca44777691b14293eb955e88fda701bdcf90637efae"
sha256 = "626953ec28ae956ec1233c4350deab6e5cdcbdd9ae6d491e102ad7c6901cc8bf"
sha512 = "ae375b002cfaacdbaa133bb87747d1b86675e13144067c3005d6c32cf5c37bb7a52b693ae46d5cd65fc4910a78d7255d0ada5142828a022497fd0eaacb61761f"
13 changes: 5 additions & 8 deletions wit-0.3.0-draft/deps/clocks/monotonic-clock.wit
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,20 @@ package wasi:clocks@0.3.0-rc-2025-08-15;
/// successive reads of the clock will produce non-decreasing values.
@since(version = 0.3.0-rc-2025-08-15)
interface monotonic-clock {
use types.{duration};

/// 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-rc-2025-08-15)
type instant = u64;

/// A duration of time, in nanoseconds.
@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.
///
/// For completeness, this function traps if it's not possible to represent
/// the value of the clock in an `instant`. Consequently, implementations
/// should ensure that the starting time is low enough to avoid the
/// possibility of overflow in practice.
@since(version = 0.3.0-rc-2025-08-15)
now: func() -> instant;

Expand All @@ -40,7 +37,7 @@ interface monotonic-clock {
when: instant,
);

/// Wait for the specified duration to elapse.
/// Wait for the specified duration has elapsed.
@since(version = 0.3.0-rc-2025-08-15)
wait-for: async func(
how-long: duration,
Expand Down
8 changes: 0 additions & 8 deletions wit-0.3.0-draft/deps/clocks/types.wit

This file was deleted.

8 changes: 4 additions & 4 deletions wit-0.3.0-draft/ip-name-lookup.wit
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@since(version = 0.3.0-rc-2025-09-16)
@since(version = 0.3.0-rc-2025-08-15)
interface ip-name-lookup {
@since(version = 0.3.0-rc-2025-09-16)
@since(version = 0.3.0-rc-2025-08-15)
use types.{ip-address};

/// Lookup error codes.
@since(version = 0.3.0-rc-2025-09-16)
@since(version = 0.3.0-rc-2025-08-15)
enum error-code {
/// Unknown error
unknown,
Expand Down Expand Up @@ -57,6 +57,6 @@ interface ip-name-lookup {
/// - <https://man7.org/linux/man-pages/man3/getaddrinfo.3.html>
/// - <https://learn.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfo>
/// - <https://man.freebsd.org/cgi/man.cgi?query=getaddrinfo&sektion=3>
@since(version = 0.3.0-rc-2025-09-16)
@since(version = 0.3.0-rc-2025-08-15)
resolve-addresses: async func(name: string) -> result<list<ip-address>, error-code>;
}
Loading