Skip to content

Commit

Permalink
generate markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Pat Hickey committed Dec 5, 2023
1 parent c4057f3 commit 387f472
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 124 deletions.
90 changes: 27 additions & 63 deletions command.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
<ul>
<li>Imports:
<ul>
<li>interface <a href="#wasi:cli_environment_0.2.0_rc_2023_11_10"><code>wasi:cli/environment@0.2.0-rc-2023-11-10</code></a></li>
<li>interface <a href="#wasi:cli_exit_0.2.0_rc_2023_11_10"><code>wasi:cli/exit@0.2.0-rc-2023-11-10</code></a></li>
<li>interface <a href="#wasi:cli_environment_0.2.0_rc_2023_12_05"><code>wasi:cli/environment@0.2.0-rc-2023-12-05</code></a></li>
<li>interface <a href="#wasi:cli_exit_0.2.0_rc_2023_12_05"><code>wasi:cli/exit@0.2.0-rc-2023-12-05</code></a></li>
<li>interface <a href="#wasi:io_error_0.2.0_rc_2023_11_10"><code>wasi:io/error@0.2.0-rc-2023-11-10</code></a></li>
<li>interface <a href="#wasi:io_poll_0.2.0_rc_2023_11_10"><code>wasi:io/poll@0.2.0-rc-2023-11-10</code></a></li>
<li>interface <a href="#wasi:io_streams_0.2.0_rc_2023_11_10"><code>wasi:io/streams@0.2.0-rc-2023-11-10</code></a></li>
<li>interface <a href="#wasi:cli_stdin_0.2.0_rc_2023_11_10"><code>wasi:cli/stdin@0.2.0-rc-2023-11-10</code></a></li>
<li>interface <a href="#wasi:cli_stdout_0.2.0_rc_2023_11_10"><code>wasi:cli/stdout@0.2.0-rc-2023-11-10</code></a></li>
<li>interface <a href="#wasi:cli_stderr_0.2.0_rc_2023_11_10"><code>wasi:cli/stderr@0.2.0-rc-2023-11-10</code></a></li>
<li>interface <a href="#wasi:cli_terminal_input_0.2.0_rc_2023_11_10"><code>wasi:cli/terminal-input@0.2.0-rc-2023-11-10</code></a></li>
<li>interface <a href="#wasi:cli_terminal_output_0.2.0_rc_2023_11_10"><code>wasi:cli/terminal-output@0.2.0-rc-2023-11-10</code></a></li>
<li>interface <a href="#wasi:cli_terminal_stdin_0.2.0_rc_2023_11_10"><code>wasi:cli/terminal-stdin@0.2.0-rc-2023-11-10</code></a></li>
<li>interface <a href="#wasi:cli_terminal_stdout_0.2.0_rc_2023_11_10"><code>wasi:cli/terminal-stdout@0.2.0-rc-2023-11-10</code></a></li>
<li>interface <a href="#wasi:cli_terminal_stderr_0.2.0_rc_2023_11_10"><code>wasi:cli/terminal-stderr@0.2.0-rc-2023-11-10</code></a></li>
<li>interface <a href="#wasi:cli_stdin_0.2.0_rc_2023_12_05"><code>wasi:cli/stdin@0.2.0-rc-2023-12-05</code></a></li>
<li>interface <a href="#wasi:cli_stdout_0.2.0_rc_2023_12_05"><code>wasi:cli/stdout@0.2.0-rc-2023-12-05</code></a></li>
<li>interface <a href="#wasi:cli_stderr_0.2.0_rc_2023_12_05"><code>wasi:cli/stderr@0.2.0-rc-2023-12-05</code></a></li>
<li>interface <a href="#wasi:cli_terminal_input_0.2.0_rc_2023_12_05"><code>wasi:cli/terminal-input@0.2.0-rc-2023-12-05</code></a></li>
<li>interface <a href="#wasi:cli_terminal_output_0.2.0_rc_2023_12_05"><code>wasi:cli/terminal-output@0.2.0-rc-2023-12-05</code></a></li>
<li>interface <a href="#wasi:cli_terminal_stdin_0.2.0_rc_2023_12_05"><code>wasi:cli/terminal-stdin@0.2.0-rc-2023-12-05</code></a></li>
<li>interface <a href="#wasi:cli_terminal_stdout_0.2.0_rc_2023_12_05"><code>wasi:cli/terminal-stdout@0.2.0-rc-2023-12-05</code></a></li>
<li>interface <a href="#wasi:cli_terminal_stderr_0.2.0_rc_2023_12_05"><code>wasi:cli/terminal-stderr@0.2.0-rc-2023-12-05</code></a></li>
<li>interface <a href="#wasi:clocks_monotonic_clock_0.2.0_rc_2023_11_10"><code>wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10</code></a></li>
<li>interface <a href="#wasi:clocks_wall_clock_0.2.0_rc_2023_11_10"><code>wasi:clocks/wall-clock@0.2.0-rc-2023-11-10</code></a></li>
<li>interface <a href="#wasi:filesystem_types_0.2.0_rc_2023_11_10"><code>wasi:filesystem/types@0.2.0-rc-2023-11-10</code></a></li>
Expand All @@ -33,11 +33,11 @@
</li>
<li>Exports:
<ul>
<li>interface <a href="#wasi:cli_run_0.2.0_rc_2023_11_10"><code>wasi:cli/run@0.2.0-rc-2023-11-10</code></a></li>
<li>interface <a href="#wasi:cli_run_0.2.0_rc_2023_12_05"><code>wasi:cli/run@0.2.0-rc-2023-12-05</code></a></li>
</ul>
</li>
</ul>
<h2><a name="wasi:cli_environment_0.2.0_rc_2023_11_10">Import interface wasi:cli/environment@0.2.0-rc-2023-11-10</a></h2>
<h2><a name="wasi:cli_environment_0.2.0_rc_2023_12_05">Import interface wasi:cli/environment@0.2.0-rc-2023-12-05</a></h2>
<hr />
<h3>Functions</h3>
<h4><a name="get_environment"><code>get-environment: func</code></a></h4>
Expand All @@ -64,7 +64,7 @@ directory, interpreting <code>.</code> as shorthand for this.</p>
<ul>
<li><a name="initial_cwd.0"></a> option&lt;<code>string</code>&gt;</li>
</ul>
<h2><a name="wasi:cli_exit_0.2.0_rc_2023_11_10">Import interface wasi:cli/exit@0.2.0-rc-2023-11-10</a></h2>
<h2><a name="wasi:cli_exit_0.2.0_rc_2023_12_05">Import interface wasi:cli/exit@0.2.0-rc-2023-12-05</a></h2>
<hr />
<h3>Functions</h3>
<h4><a name="exit"><code>exit: func</code></a></h4>
Expand All @@ -77,21 +77,7 @@ directory, interpreting <code>.</code> as shorthand for this.</p>
<hr />
<h3>Types</h3>
<h4><a name="error"><code>resource error</code></a></h4>
<p>A resource which represents some error information.</p>
<p>The only method provided by this resource is <code>to-debug-string</code>,
which provides some human-readable information about the error.</p>
<p>In the <code>wasi:io</code> package, this resource is returned through the
<code>wasi:io/streams/stream-error</code> type.</p>
<p>To provide more specific error information, other interfaces may
provide functions to further &quot;downcast&quot; this error into more specific
error information. For example, <a href="#error"><code>error</code></a>s returned in streams derived
from filesystem types to be described using the filesystem's own
error-code type, using the function
<code>wasi:filesystem/types/filesystem-error-code</code>, which takes a parameter
<code>borrow&lt;error&gt;</code> and returns
<code>option&lt;wasi:filesystem/types/error-code&gt;</code>.</p>
<h2>The set of functions which can &quot;downcast&quot; an <a href="#error"><code>error</code></a> into a more
concrete type is open.</h2>
<hr />
<h3>Functions</h3>
<h4><a name="method_error.to_debug_string"><code>[method]error.to-debug-string: func</code></a></h4>
<p>Returns a string that is suitable to assist humans in debugging
Expand All @@ -114,7 +100,7 @@ at once.</p>
<hr />
<h3>Types</h3>
<h4><a name="pollable"><code>resource pollable</code></a></h4>
<h2><a href="#pollable"><code>pollable</code></a> represents a single I/O event which may be ready, or not.</h2>
<hr />
<h3>Functions</h3>
<h4><a name="method_pollable.ready"><code>[method]pollable.ready: func</code></a></h4>
<p>Return the readiness of a pollable. This function never blocks.</p>
Expand Down Expand Up @@ -188,21 +174,8 @@ future operations.
</li>
</ul>
<h4><a name="input_stream"><code>resource input-stream</code></a></h4>
<p>An input bytestream.</p>
<p><a href="#input_stream"><code>input-stream</code></a>s are <em>non-blocking</em> to the extent practical on underlying
platforms. I/O operations always return promptly; if fewer bytes are
promptly available than requested, they return the number of bytes promptly
available, which could even be zero. To wait for data to be available,
use the <code>subscribe</code> function to obtain a <a href="#pollable"><code>pollable</code></a> which can be polled
for using <code>wasi:io/poll</code>.</p>
<h4><a name="output_stream"><code>resource output-stream</code></a></h4>
<p>An output bytestream.</p>
<h2><a href="#output_stream"><code>output-stream</code></a>s are <em>non-blocking</em> to the extent practical on
underlying platforms. Except where specified otherwise, I/O operations also
always return promptly, after the number of bytes that can be written
promptly, which could even be zero. To wait for the stream to be ready to
accept data, the <code>subscribe</code> function to obtain a <a href="#pollable"><code>pollable</code></a> which can be
polled for using <code>wasi:io/poll</code>.</h2>
<hr />
<h3>Functions</h3>
<h4><a name="method_input_stream.read"><code>[method]input-stream.read: func</code></a></h4>
<p>Perform a non-blocking read from the stream.</p>
Expand Down Expand Up @@ -474,7 +447,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
<ul>
<li><a name="method_output_stream.blocking_splice.0"></a> result&lt;<code>u64</code>, <a href="#stream_error"><a href="#stream_error"><code>stream-error</code></a></a>&gt;</li>
</ul>
<h2><a name="wasi:cli_stdin_0.2.0_rc_2023_11_10">Import interface wasi:cli/stdin@0.2.0-rc-2023-11-10</a></h2>
<h2><a name="wasi:cli_stdin_0.2.0_rc_2023_12_05">Import interface wasi:cli/stdin@0.2.0-rc-2023-12-05</a></h2>
<hr />
<h3>Types</h3>
<h4><a name="input_stream"><code>type input-stream</code></a></h4>
Expand All @@ -487,7 +460,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
<ul>
<li><a name="get_stdin.0"></a> own&lt;<a href="#input_stream"><a href="#input_stream"><code>input-stream</code></a></a>&gt;</li>
</ul>
<h2><a name="wasi:cli_stdout_0.2.0_rc_2023_11_10">Import interface wasi:cli/stdout@0.2.0-rc-2023-11-10</a></h2>
<h2><a name="wasi:cli_stdout_0.2.0_rc_2023_12_05">Import interface wasi:cli/stdout@0.2.0-rc-2023-12-05</a></h2>
<hr />
<h3>Types</h3>
<h4><a name="output_stream"><code>type output-stream</code></a></h4>
Expand All @@ -500,7 +473,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
<ul>
<li><a name="get_stdout.0"></a> own&lt;<a href="#output_stream"><a href="#output_stream"><code>output-stream</code></a></a>&gt;</li>
</ul>
<h2><a name="wasi:cli_stderr_0.2.0_rc_2023_11_10">Import interface wasi:cli/stderr@0.2.0-rc-2023-11-10</a></h2>
<h2><a name="wasi:cli_stderr_0.2.0_rc_2023_12_05">Import interface wasi:cli/stderr@0.2.0-rc-2023-12-05</a></h2>
<hr />
<h3>Types</h3>
<h4><a name="output_stream"><code>type output-stream</code></a></h4>
Expand All @@ -513,17 +486,15 @@ is ready for reading, before performing the <code>splice</code>.</p>
<ul>
<li><a name="get_stderr.0"></a> own&lt;<a href="#output_stream"><a href="#output_stream"><code>output-stream</code></a></a>&gt;</li>
</ul>
<h2><a name="wasi:cli_terminal_input_0.2.0_rc_2023_11_10">Import interface wasi:cli/terminal-input@0.2.0-rc-2023-11-10</a></h2>
<h2><a name="wasi:cli_terminal_input_0.2.0_rc_2023_12_05">Import interface wasi:cli/terminal-input@0.2.0-rc-2023-12-05</a></h2>
<hr />
<h3>Types</h3>
<h4><a name="terminal_input"><code>resource terminal-input</code></a></h4>
<p>The input side of a terminal.</p>
<h2><a name="wasi:cli_terminal_output_0.2.0_rc_2023_11_10">Import interface wasi:cli/terminal-output@0.2.0-rc-2023-11-10</a></h2>
<h2><a name="wasi:cli_terminal_output_0.2.0_rc_2023_12_05">Import interface wasi:cli/terminal-output@0.2.0-rc-2023-12-05</a></h2>
<hr />
<h3>Types</h3>
<h4><a name="terminal_output"><code>resource terminal-output</code></a></h4>
<p>The output side of a terminal.</p>
<h2><a name="wasi:cli_terminal_stdin_0.2.0_rc_2023_11_10">Import interface wasi:cli/terminal-stdin@0.2.0-rc-2023-11-10</a></h2>
<h2><a name="wasi:cli_terminal_stdin_0.2.0_rc_2023_12_05">Import interface wasi:cli/terminal-stdin@0.2.0-rc-2023-12-05</a></h2>
<p>An interface providing an optional <a href="#terminal_input"><code>terminal-input</code></a> for stdin as a
link-time authority.</p>
<hr />
Expand All @@ -540,7 +511,7 @@ allowing further interaction with it.</p>
<ul>
<li><a name="get_terminal_stdin.0"></a> option&lt;own&lt;<a href="#terminal_input"><a href="#terminal_input"><code>terminal-input</code></a></a>&gt;&gt;</li>
</ul>
<h2><a name="wasi:cli_terminal_stdout_0.2.0_rc_2023_11_10">Import interface wasi:cli/terminal-stdout@0.2.0-rc-2023-11-10</a></h2>
<h2><a name="wasi:cli_terminal_stdout_0.2.0_rc_2023_12_05">Import interface wasi:cli/terminal-stdout@0.2.0-rc-2023-12-05</a></h2>
<p>An interface providing an optional <a href="#terminal_output"><code>terminal-output</code></a> for stdout as a
link-time authority.</p>
<hr />
Expand All @@ -557,7 +528,7 @@ allowing further interaction with it.</p>
<ul>
<li><a name="get_terminal_stdout.0"></a> option&lt;own&lt;<a href="#terminal_output"><a href="#terminal_output"><code>terminal-output</code></a></a>&gt;&gt;</li>
</ul>
<h2><a name="wasi:cli_terminal_stderr_0.2.0_rc_2023_11_10">Import interface wasi:cli/terminal-stderr@0.2.0-rc-2023-11-10</a></h2>
<h2><a name="wasi:cli_terminal_stderr_0.2.0_rc_2023_12_05">Import interface wasi:cli/terminal-stderr@0.2.0-rc-2023-12-05</a></h2>
<p>An interface providing an optional <a href="#terminal_output"><code>terminal-output</code></a> for stderr as a
link-time authority.</p>
<hr />
Expand Down Expand Up @@ -1106,11 +1077,8 @@ not reuse it thereafter.
</li>
</ul>
<h4><a name="descriptor"><code>resource descriptor</code></a></h4>
<p>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.</p>
<h4><a name="directory_entry_stream"><code>resource directory-entry-stream</code></a></h4>
<h2>A stream of directory entries.</h2>
<hr />
<h3>Functions</h3>
<h4><a name="method_descriptor.read_via_stream"><code>[method]descriptor.read-via-stream: func</code></a></h4>
<p>Return a stream for reading from a file, if available.</p>
Expand Down Expand Up @@ -1574,9 +1542,6 @@ errors are filesystem-related errors.</p>
<hr />
<h3>Types</h3>
<h4><a name="network"><code>resource network</code></a></h4>
<p>An 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.</p>
<h4><a name="error_code"><code>enum error-code</code></a></h4>
<p>Error codes.</p>
<p>In theory, every API can return any error code.
Expand Down Expand Up @@ -1812,7 +1777,6 @@ combined with a couple of errors that are always possible:</p>
</li>
</ul>
<h4><a name="udp_socket"><code>resource udp-socket</code></a></h4>
<p>A UDP socket handle.</p>
<h4><a name="incoming_datagram_stream"><code>resource incoming-datagram-stream</code></a></h4>
<h4><a name="outgoing_datagram_stream"><code>resource outgoing-datagram-stream</code></a></h4>
<hr />
Expand Down Expand Up @@ -2288,7 +2252,7 @@ the socket is effectively an in-memory configuration object, unable to communica
</li>
</ul>
<h4><a name="tcp_socket"><code>resource tcp-socket</code></a></h4>
<h2>A TCP socket handle.</h2>
<hr />
<h3>Functions</h3>
<h4><a name="method_tcp_socket.start_bind"><code>[method]tcp-socket.start-bind: func</code></a></h4>
<p>Bind the socket to a specific network on the provided IP address and port.</p>
Expand Down Expand Up @@ -3045,7 +3009,7 @@ protection.</p>
<ul>
<li><a name="insecure_seed.0"></a> (<code>u64</code>, <code>u64</code>)</li>
</ul>
<h2><a name="wasi:cli_run_0.2.0_rc_2023_11_10">Export interface wasi:cli/run@0.2.0-rc-2023-11-10</a></h2>
<h2><a name="wasi:cli_run_0.2.0_rc_2023_12_05">Export interface wasi:cli/run@0.2.0-rc-2023-12-05</a></h2>
<hr />
<h3>Functions</h3>
<h4><a name="run"><code>run: func</code></a></h4>
Expand Down
Loading

0 comments on commit 387f472

Please sign in to comment.