diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ef42807..584e02c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,9 +20,9 @@ jobs: git add -N wit/deps git add -N wit-0.3.0-draft/deps git diff --exit-code - - uses: WebAssembly/wit-abi-up-to-date@v22 + - uses: WebAssembly/wit-abi-up-to-date@v23 with: wit-bindgen: '0.33.0' wasm-tools: '1.218.0' worlds: 'command imports' - features: 'cli-exit-with-code' + all-features: 'true' diff --git a/command.md b/command.md index 1350bc2..ee3d650 100644 --- a/command.md +++ b/command.md @@ -17,6 +17,7 @@
wasi:cli/terminal-stderr@0.2.4wasi:clocks/monotonic-clock@0.2.4wasi:clocks/wall-clock@0.2.4wasi:clocks/timezone@0.2.4wasi:filesystem/types@0.2.4wasi:filesystem/preopens@0.2.4wasi:sockets/network@0.2.4type datetime+#### `record timezone-display` +
Information useful for displaying the timezone of a specific datetime.
This information may vary within a single timezone to reflect daylight
+saving time adjustments.
utc-offset: s32
The number of seconds difference between UTC time and the local +time of the timezone. +
The returned value will always be less than 86400 which is the +number of seconds in a day (246060).
+In implementations that do not expose an actual time zone, this +should return 0.
+The abbreviated name of the timezone to display to a user. The name +`UTC` indicates Coordinated Universal Time. Otherwise, this should +reference local standards for the name of the time zone. +
In implementations that do not expose an actual time zone, this
+should be the string UTC.
In time zones that do not have an applicable name, a formatted
+representation of the UTC offset may be returned, such as -04:00.
Whether daylight saving time is active. +
In implementations that do not expose an actual time zone, this +should return false.
+display: funcReturn information needed to display the given datetime. This includes
+the UTC offset, the time zone name, and a flag indicating whether
+daylight saving time is active.
If the timezone cannot be determined for the given datetime, return a
+timezone-display for UTC with a utc-offset of 0 and no daylight
+saving time.
when: datetimetimezone-displayutc-offset: funcThe same as display, but only return the UTC offset.
when: datetimeWASI filesystem is a filesystem API primarily intended to let users run WASI programs that access their files on their existing filesystems, without @@ -1603,7 +1669,10 @@ errors are filesystem-related errors.
resource networktype errorAn opaque resource that represents access to (a subset of) the network. This enables context-based security for networking. There is no need for this to map 1:1 to a physical network interface.
@@ -1793,6 +1862,25 @@ supported size.ipv4: ipv4-socket-addressipv6: ipv6-socket-addressnetwork-error-code: funcAttempts to extract a network-related error-code from the stream
+error provided.
Stream operations which return stream-error::last-operation-failed
+have a payload with more information about the operation that failed.
+This payload can be passed through to this function to see if there's
+network-related information about the error to return.
Note that this function is fallible because not all stream-related +errors are network-related errors.
+err: borrow<error>error-code>This interface provides a value-export of the default network handle..
wasi:cli/terminal-stderr@0.2.4wasi:clocks/monotonic-clock@0.2.4wasi:clocks/wall-clock@0.2.4wasi:clocks/timezone@0.2.4wasi:filesystem/types@0.2.4wasi:filesystem/preopens@0.2.4wasi:sockets/network@0.2.4type datetime+#### `record timezone-display` +
Information useful for displaying the timezone of a specific datetime.
This information may vary within a single timezone to reflect daylight
+saving time adjustments.
utc-offset: s32
The number of seconds difference between UTC time and the local +time of the timezone. +
The returned value will always be less than 86400 which is the +number of seconds in a day (246060).
+In implementations that do not expose an actual time zone, this +should return 0.
+The abbreviated name of the timezone to display to a user. The name +`UTC` indicates Coordinated Universal Time. Otherwise, this should +reference local standards for the name of the time zone. +
In implementations that do not expose an actual time zone, this
+should be the string UTC.
In time zones that do not have an applicable name, a formatted
+representation of the UTC offset may be returned, such as -04:00.
Whether daylight saving time is active. +
In implementations that do not expose an actual time zone, this +should return false.
+display: funcReturn information needed to display the given datetime. This includes
+the UTC offset, the time zone name, and a flag indicating whether
+daylight saving time is active.
If the timezone cannot be determined for the given datetime, return a
+timezone-display for UTC with a utc-offset of 0 and no daylight
+saving time.
when: datetimetimezone-displayutc-offset: funcThe same as display, but only return the UTC offset.
when: datetimeWASI filesystem is a filesystem API primarily intended to let users run WASI programs that access their files on their existing filesystems, without @@ -1598,7 +1664,10 @@ errors are filesystem-related errors.
resource networktype errorAn opaque resource that represents access to (a subset of) the network. This enables context-based security for networking. There is no need for this to map 1:1 to a physical network interface.
@@ -1788,6 +1857,25 @@ supported size.ipv4: ipv4-socket-addressipv6: ipv6-socket-addressnetwork-error-code: funcAttempts to extract a network-related error-code from the stream
+error provided.
Stream operations which return stream-error::last-operation-failed
+have a payload with more information about the operation that failed.
+This payload can be passed through to this function to see if there's
+network-related information about the error to return.
Note that this function is fallible because not all stream-related +errors are network-related errors.
+err: borrow<error>error-code>This interface provides a value-export of the default network handle..