Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Commit 82b86d9

Browse files
authored
Merge pull request #63 from ricochet/all-fts
ci: render all-features
2 parents e4c71d8 + 8354682 commit 82b86d9

File tree

3 files changed

+180
-4
lines changed

3 files changed

+180
-4
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
git add -N wit/deps
2121
git add -N wit-0.3.0-draft/deps
2222
git diff --exit-code
23-
- uses: WebAssembly/wit-abi-up-to-date@v22
23+
- uses: WebAssembly/wit-abi-up-to-date@v23
2424
with:
2525
wit-bindgen: '0.33.0'
2626
wasm-tools: '1.218.0'
2727
worlds: 'command imports'
28-
features: 'cli-exit-with-code'
28+
all-features: 'true'

command.md

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<li>interface <a href="#wasi_cli_terminal_stderr_0_2_4"><code>wasi:cli/terminal-stderr@0.2.4</code></a></li>
1818
<li>interface <a href="#wasi_clocks_monotonic_clock_0_2_4"><code>wasi:clocks/monotonic-clock@0.2.4</code></a></li>
1919
<li>interface <a href="#wasi_clocks_wall_clock_0_2_4"><code>wasi:clocks/wall-clock@0.2.4</code></a></li>
20+
<li>interface <a href="#wasi_clocks_timezone_0_2_4"><code>wasi:clocks/timezone@0.2.4</code></a></li>
2021
<li>interface <a href="#wasi_filesystem_types_0_2_4"><code>wasi:filesystem/types@0.2.4</code></a></li>
2122
<li>interface <a href="#wasi_filesystem_preopens_0_2_4"><code>wasi:filesystem/preopens@0.2.4</code></a></li>
2223
<li>interface <a href="#wasi_sockets_network_0_2_4"><code>wasi:sockets/network@0.2.4</code></a></li>
@@ -708,6 +709,71 @@ also known as <a href="https://en.wikipedia.org/wiki/Unix_time">Unix Time</a>.</
708709
<ul>
709710
<li><a id="resolution.0"></a> <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
710711
</ul>
712+
<h2><a id="wasi_clocks_timezone_0_2_4"></a>Import interface wasi:clocks/timezone@0.2.4</h2>
713+
<hr />
714+
<h3>Types</h3>
715+
<h4><a id="datetime"></a><code>type datetime</code></h4>
716+
<p><a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></p>
717+
<p>
718+
#### <a id="timezone_display"></a>`record timezone-display`
719+
<p>Information useful for displaying the timezone of a specific <a href="#datetime"><code>datetime</code></a>.</p>
720+
<p>This information may vary within a single <code>timezone</code> to reflect daylight
721+
saving time adjustments.</p>
722+
<h5>Record Fields</h5>
723+
<ul>
724+
<li>
725+
<p><a id="timezone_display.utc_offset"></a><a href="#utc_offset"><code>utc-offset</code></a>: <code>s32</code></p>
726+
<p>The number of seconds difference between UTC time and the local
727+
time of the timezone.
728+
<p>The returned value will always be less than 86400 which is the
729+
number of seconds in a day (24<em>60</em>60).</p>
730+
<p>In implementations that do not expose an actual time zone, this
731+
should return 0.</p>
732+
</li>
733+
<li>
734+
<p><a id="timezone_display.name"></a><code>name</code>: <code>string</code></p>
735+
<p>The abbreviated name of the timezone to display to a user. The name
736+
`UTC` indicates Coordinated Universal Time. Otherwise, this should
737+
reference local standards for the name of the time zone.
738+
<p>In implementations that do not expose an actual time zone, this
739+
should be the string <code>UTC</code>.</p>
740+
<p>In time zones that do not have an applicable name, a formatted
741+
representation of the UTC offset may be returned, such as <code>-04:00</code>.</p>
742+
</li>
743+
<li>
744+
<p><a id="timezone_display.in_daylight_saving_time"></a><code>in-daylight-saving-time</code>: <code>bool</code></p>
745+
<p>Whether daylight saving time is active.
746+
<p>In implementations that do not expose an actual time zone, this
747+
should return false.</p>
748+
</li>
749+
</ul>
750+
<hr />
751+
<h3>Functions</h3>
752+
<h4><a id="display"></a><code>display: func</code></h4>
753+
<p>Return information needed to display the given <a href="#datetime"><code>datetime</code></a>. This includes
754+
the UTC offset, the time zone name, and a flag indicating whether
755+
daylight saving time is active.</p>
756+
<p>If the timezone cannot be determined for the given <a href="#datetime"><code>datetime</code></a>, return a
757+
<a href="#timezone_display"><code>timezone-display</code></a> for <code>UTC</code> with a <a href="#utc_offset"><code>utc-offset</code></a> of 0 and no daylight
758+
saving time.</p>
759+
<h5>Params</h5>
760+
<ul>
761+
<li><a id="display.when"></a><code>when</code>: <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
762+
</ul>
763+
<h5>Return values</h5>
764+
<ul>
765+
<li><a id="display.0"></a> <a href="#timezone_display"><a href="#timezone_display"><code>timezone-display</code></a></a></li>
766+
</ul>
767+
<h4><a id="utc_offset"></a><code>utc-offset: func</code></h4>
768+
<p>The same as <a href="#display"><code>display</code></a>, but only return the UTC offset.</p>
769+
<h5>Params</h5>
770+
<ul>
771+
<li><a id="utc_offset.when"></a><code>when</code>: <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
772+
</ul>
773+
<h5>Return values</h5>
774+
<ul>
775+
<li><a id="utc_offset.0"></a> <code>s32</code></li>
776+
</ul>
711777
<h2><a id="wasi_filesystem_types_0_2_4"></a>Import interface wasi:filesystem/types@0.2.4</h2>
712778
<p>WASI filesystem is a filesystem API primarily intended to let users run WASI
713779
programs that access their files on their existing filesystems, without
@@ -1603,7 +1669,10 @@ errors are filesystem-related errors.</p>
16031669
<h2><a id="wasi_sockets_network_0_2_4"></a>Import interface wasi:sockets/network@0.2.4</h2>
16041670
<hr />
16051671
<h3>Types</h3>
1606-
<h4><a id="network"></a><code>resource network</code></h4>
1672+
<h4><a id="error"></a><code>type error</code></h4>
1673+
<p><a href="#error"><a href="#error"><code>error</code></a></a></p>
1674+
<p>
1675+
#### <a id="network"></a>`resource network`
16071676
<p>An opaque resource that represents access to (a subset of) the network.
16081677
This enables context-based security for networking.
16091678
There is no need for this to map 1:1 to a physical network interface.</p>
@@ -1793,6 +1862,25 @@ supported size.
17931862
<li><a id="ip_socket_address.ipv4"></a><code>ipv4</code>: <a href="#ipv4_socket_address"><a href="#ipv4_socket_address"><code>ipv4-socket-address</code></a></a></li>
17941863
<li><a id="ip_socket_address.ipv6"></a><code>ipv6</code>: <a href="#ipv6_socket_address"><a href="#ipv6_socket_address"><code>ipv6-socket-address</code></a></a></li>
17951864
</ul>
1865+
<hr />
1866+
<h3>Functions</h3>
1867+
<h4><a id="network_error_code"></a><code>network-error-code: func</code></h4>
1868+
<p>Attempts to extract a network-related <a href="#error_code"><code>error-code</code></a> from the stream
1869+
<a href="#error"><code>error</code></a> provided.</p>
1870+
<p>Stream operations which return <a href="#stream_error.last_operation_failed"><code>stream-error::last-operation-failed</code></a>
1871+
have a payload with more information about the operation that failed.
1872+
This payload can be passed through to this function to see if there's
1873+
network-related information about the error to return.</p>
1874+
<p>Note that this function is fallible because not all stream-related
1875+
errors are network-related errors.</p>
1876+
<h5>Params</h5>
1877+
<ul>
1878+
<li><a id="network_error_code.err"></a><code>err</code>: borrow&lt;<a href="#error"><a href="#error"><code>error</code></a></a>&gt;</li>
1879+
</ul>
1880+
<h5>Return values</h5>
1881+
<ul>
1882+
<li><a id="network_error_code.0"></a> option&lt;<a href="#error_code"><a href="#error_code"><code>error-code</code></a></a>&gt;</li>
1883+
</ul>
17961884
<h2><a id="wasi_sockets_instance_network_0_2_4"></a>Import interface wasi:sockets/instance-network@0.2.4</h2>
17971885
<p>This interface provides a value-export of the default network handle..</p>
17981886
<hr />

imports.md

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<li>interface <a href="#wasi_cli_terminal_stderr_0_2_4"><code>wasi:cli/terminal-stderr@0.2.4</code></a></li>
1818
<li>interface <a href="#wasi_clocks_monotonic_clock_0_2_4"><code>wasi:clocks/monotonic-clock@0.2.4</code></a></li>
1919
<li>interface <a href="#wasi_clocks_wall_clock_0_2_4"><code>wasi:clocks/wall-clock@0.2.4</code></a></li>
20+
<li>interface <a href="#wasi_clocks_timezone_0_2_4"><code>wasi:clocks/timezone@0.2.4</code></a></li>
2021
<li>interface <a href="#wasi_filesystem_types_0_2_4"><code>wasi:filesystem/types@0.2.4</code></a></li>
2122
<li>interface <a href="#wasi_filesystem_preopens_0_2_4"><code>wasi:filesystem/preopens@0.2.4</code></a></li>
2223
<li>interface <a href="#wasi_sockets_network_0_2_4"><code>wasi:sockets/network@0.2.4</code></a></li>
@@ -703,6 +704,71 @@ also known as <a href="https://en.wikipedia.org/wiki/Unix_time">Unix Time</a>.</
703704
<ul>
704705
<li><a id="resolution.0"></a> <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
705706
</ul>
707+
<h2><a id="wasi_clocks_timezone_0_2_4"></a>Import interface wasi:clocks/timezone@0.2.4</h2>
708+
<hr />
709+
<h3>Types</h3>
710+
<h4><a id="datetime"></a><code>type datetime</code></h4>
711+
<p><a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></p>
712+
<p>
713+
#### <a id="timezone_display"></a>`record timezone-display`
714+
<p>Information useful for displaying the timezone of a specific <a href="#datetime"><code>datetime</code></a>.</p>
715+
<p>This information may vary within a single <code>timezone</code> to reflect daylight
716+
saving time adjustments.</p>
717+
<h5>Record Fields</h5>
718+
<ul>
719+
<li>
720+
<p><a id="timezone_display.utc_offset"></a><a href="#utc_offset"><code>utc-offset</code></a>: <code>s32</code></p>
721+
<p>The number of seconds difference between UTC time and the local
722+
time of the timezone.
723+
<p>The returned value will always be less than 86400 which is the
724+
number of seconds in a day (24<em>60</em>60).</p>
725+
<p>In implementations that do not expose an actual time zone, this
726+
should return 0.</p>
727+
</li>
728+
<li>
729+
<p><a id="timezone_display.name"></a><code>name</code>: <code>string</code></p>
730+
<p>The abbreviated name of the timezone to display to a user. The name
731+
`UTC` indicates Coordinated Universal Time. Otherwise, this should
732+
reference local standards for the name of the time zone.
733+
<p>In implementations that do not expose an actual time zone, this
734+
should be the string <code>UTC</code>.</p>
735+
<p>In time zones that do not have an applicable name, a formatted
736+
representation of the UTC offset may be returned, such as <code>-04:00</code>.</p>
737+
</li>
738+
<li>
739+
<p><a id="timezone_display.in_daylight_saving_time"></a><code>in-daylight-saving-time</code>: <code>bool</code></p>
740+
<p>Whether daylight saving time is active.
741+
<p>In implementations that do not expose an actual time zone, this
742+
should return false.</p>
743+
</li>
744+
</ul>
745+
<hr />
746+
<h3>Functions</h3>
747+
<h4><a id="display"></a><code>display: func</code></h4>
748+
<p>Return information needed to display the given <a href="#datetime"><code>datetime</code></a>. This includes
749+
the UTC offset, the time zone name, and a flag indicating whether
750+
daylight saving time is active.</p>
751+
<p>If the timezone cannot be determined for the given <a href="#datetime"><code>datetime</code></a>, return a
752+
<a href="#timezone_display"><code>timezone-display</code></a> for <code>UTC</code> with a <a href="#utc_offset"><code>utc-offset</code></a> of 0 and no daylight
753+
saving time.</p>
754+
<h5>Params</h5>
755+
<ul>
756+
<li><a id="display.when"></a><code>when</code>: <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
757+
</ul>
758+
<h5>Return values</h5>
759+
<ul>
760+
<li><a id="display.0"></a> <a href="#timezone_display"><a href="#timezone_display"><code>timezone-display</code></a></a></li>
761+
</ul>
762+
<h4><a id="utc_offset"></a><code>utc-offset: func</code></h4>
763+
<p>The same as <a href="#display"><code>display</code></a>, but only return the UTC offset.</p>
764+
<h5>Params</h5>
765+
<ul>
766+
<li><a id="utc_offset.when"></a><code>when</code>: <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
767+
</ul>
768+
<h5>Return values</h5>
769+
<ul>
770+
<li><a id="utc_offset.0"></a> <code>s32</code></li>
771+
</ul>
706772
<h2><a id="wasi_filesystem_types_0_2_4"></a>Import interface wasi:filesystem/types@0.2.4</h2>
707773
<p>WASI filesystem is a filesystem API primarily intended to let users run WASI
708774
programs that access their files on their existing filesystems, without
@@ -1598,7 +1664,10 @@ errors are filesystem-related errors.</p>
15981664
<h2><a id="wasi_sockets_network_0_2_4"></a>Import interface wasi:sockets/network@0.2.4</h2>
15991665
<hr />
16001666
<h3>Types</h3>
1601-
<h4><a id="network"></a><code>resource network</code></h4>
1667+
<h4><a id="error"></a><code>type error</code></h4>
1668+
<p><a href="#error"><a href="#error"><code>error</code></a></a></p>
1669+
<p>
1670+
#### <a id="network"></a>`resource network`
16021671
<p>An opaque resource that represents access to (a subset of) the network.
16031672
This enables context-based security for networking.
16041673
There is no need for this to map 1:1 to a physical network interface.</p>
@@ -1788,6 +1857,25 @@ supported size.
17881857
<li><a id="ip_socket_address.ipv4"></a><code>ipv4</code>: <a href="#ipv4_socket_address"><a href="#ipv4_socket_address"><code>ipv4-socket-address</code></a></a></li>
17891858
<li><a id="ip_socket_address.ipv6"></a><code>ipv6</code>: <a href="#ipv6_socket_address"><a href="#ipv6_socket_address"><code>ipv6-socket-address</code></a></a></li>
17901859
</ul>
1860+
<hr />
1861+
<h3>Functions</h3>
1862+
<h4><a id="network_error_code"></a><code>network-error-code: func</code></h4>
1863+
<p>Attempts to extract a network-related <a href="#error_code"><code>error-code</code></a> from the stream
1864+
<a href="#error"><code>error</code></a> provided.</p>
1865+
<p>Stream operations which return <a href="#stream_error.last_operation_failed"><code>stream-error::last-operation-failed</code></a>
1866+
have a payload with more information about the operation that failed.
1867+
This payload can be passed through to this function to see if there's
1868+
network-related information about the error to return.</p>
1869+
<p>Note that this function is fallible because not all stream-related
1870+
errors are network-related errors.</p>
1871+
<h5>Params</h5>
1872+
<ul>
1873+
<li><a id="network_error_code.err"></a><code>err</code>: borrow&lt;<a href="#error"><a href="#error"><code>error</code></a></a>&gt;</li>
1874+
</ul>
1875+
<h5>Return values</h5>
1876+
<ul>
1877+
<li><a id="network_error_code.0"></a> option&lt;<a href="#error_code"><a href="#error_code"><code>error-code</code></a></a>&gt;</li>
1878+
</ul>
17911879
<h2><a id="wasi_sockets_instance_network_0_2_4"></a>Import interface wasi:sockets/instance-network@0.2.4</h2>
17921880
<p>This interface provides a value-export of the default network handle..</p>
17931881
<hr />

0 commit comments

Comments
 (0)