From 89eb0d955c3848f457fdcff1270db190b7d2a2ee Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Fri, 10 Nov 2023 16:14:53 -0800 Subject: [PATCH] generate markdown --- command.md | 978 ++++++++++++++++++++++++++-------------------------- reactor.md | 980 ++++++++++++++++++++++++++--------------------------- 2 files changed, 965 insertions(+), 993 deletions(-) diff --git a/command.md b/command.md index 4c9ead4..dda65a8 100644 --- a/command.md +++ b/command.md @@ -2,42 +2,42 @@ -

Import interface wasi:clocks/wall-clock

+

Import interface wasi:clocks/wall-clock@0.2.0-rc-2023-11-10

WASI Wall Clock is a clock API intended to let users query the current time. The name "wall" makes an analogy to a "clock on the wall", which is not necessarily monotonic as it may be reset.

@@ -78,7 +78,7 @@ also known as Unix Time.
  • datetime
  • -

    Import interface wasi:io/poll

    +

    Import interface wasi:io/poll@0.2.0-rc-2023-11-10

    A poll API intended to let users wait for I/O events on multiple handles at once.


    @@ -128,7 +128,7 @@ being reaedy for I/O.

    -

    Import interface wasi:clocks/monotonic-clock

    +

    Import interface wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10

    WASI Monotonic Clock is a clock API intended to let users measure elapsed time.

    It is intended to be portable at least between Unix-family platforms and @@ -189,83 +189,41 @@ occured.

    -

    Import interface wasi:clocks/timezone

    +

    Import interface wasi:io/error@0.2.0-rc-2023-11-10


    Types

    -

    type datetime

    -

    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.

    -
    Record Fields
    - +

    resource error


    Functions

    -

    display: func

    -

    Return 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.

    -
    Params
    - -
    Return values
    - -

    utc-offset: func

    -

    The same as display, but only return the UTC offset.

    +

    [method]error.to-debug-string: func

    +

    Returns a string that is suitable to assist humans in debugging +this error.

    +

    WARNING: The returned string should not be consumed mechanically! +It may change across platforms, hosts, or other implementation +details. Parsing this string is a major platform-compatibility +hazard.

    Params
    Return values
    -

    Import interface wasi:io/streams

    +

    Import interface wasi:io/streams@0.2.0-rc-2023-11-10

    WASI I/O is an I/O abstraction API which is currently focused on providing stream types.

    In the future, the component model is expected to add built-in stream types; when it does, they are expected to subsume this API.


    Types

    -

    type pollable

    -

    pollable

    +

    type error

    +

    error

    +

    +#### `type pollable` +[`pollable`](#pollable)

    -#### `resource error` -

    variant stream-error

    +#### `variant stream-error`

    An error for input-stream and output-stream operations.

    Variant Cases
    -

    flags modes

    -

    Permissions mode used by open-at, change-file-permissions-at, and -similar.

    -
    Flags members
    - -

    variant access-type

    -

    Access type used by access-at.

    -
    Variant Cases
    -

    type link-count

    u64

    Number of hard links to an inode. @@ -1324,7 +1234,6 @@ contains truncate or create, and the base descriptor d

  • path: string
  • open-flags: open-flags
  • flags: descriptor-flags
  • -
  • modes: modes
  • Return values

    See each individual API for what the POSIX equivalents are. They sometimes differ per API.

    Enum Cases
    @@ -1582,6 +1438,11 @@ combined with a couple of errors that are always possible:

    POSIX equivalent: EOPNOTSUPP

  • +

    invalid-argument

    +

    One of the arguments is invalid. +

    POSIX equivalent: EINVAL

    +
  • +
  • out-of-memory

    Not enough memory to complete the operation.

    POSIX equivalent: ENOMEM, ENOBUFS, EAI_MEMORY

    @@ -1593,6 +1454,7 @@ combined with a couple of errors that are always possible:

  • concurrency-conflict

    This operation is incompatible with another asynchronous operation that is already in progress. +

    POSIX equivalent: EALREADY

  • not-in-progress

    @@ -1607,74 +1469,26 @@ combined with a couple of errors that are always possible:

    Note: this is scheduled to be removed when futures are natively supported.

  • -

    address-family-not-supported

    -

    The specified address-family is not supported. -

  • -
  • -

    address-family-mismatch

    -

    An IPv4 address was passed to an IPv6 resource, or vice versa. -

  • -
  • -

    invalid-remote-address

    -

    The socket address is not a valid remote address. E.g. the IP address is set to INADDR_ANY, or the port is set to 0. -

  • -
  • -

    ipv4-only-operation

    -

    The operation is only supported on IPv4 resources. -

  • -
  • -

    ipv6-only-operation

    -

    The operation is only supported on IPv6 resources. +

    invalid-state

    +

    The operation is not valid in the socket's current state.

  • new-socket-limit

    A new socket resource could not be created because of a system limit.

  • -

    already-attached

    -

    The socket is already attached to another network. -

  • -
  • -

    already-bound

    -

    The socket is already bound. -

  • -
  • -

    already-connected

    -

    The socket is already in the Connection state. -

  • -
  • -

    not-bound

    -

    The socket is not bound to any local address. -

  • -
  • -

    not-connected

    -

    The socket is not in the Connection state. -

  • -
  • address-not-bindable

    A bind operation failed because the provided address is not an address that the `network` can bind to.

  • address-in-use

    -

    A bind operation failed because the provided address is already in use. -

  • -
  • -

    ephemeral-ports-exhausted

    -

    A bind operation failed because there are no ephemeral ports available. +

    A bind operation failed because the provided address is already in use or because there are no ephemeral ports available.

  • remote-unreachable

    The remote address is not reachable

  • -

    already-listening

    -

    The socket is already in the Listener state. -

  • -
  • -

    not-listening

    -

    The socket is already in the Listener state. -

  • -
  • connection-refused

    The connection was forcefully rejected

  • @@ -1683,11 +1497,11 @@ combined with a couple of errors that are always possible:

    The connection was reset.

  • -

    datagram-too-large

    +

    connection-aborted

    +

    A connection was aborted.

  • -

    invalid-name

    -

    The provided name is a syntactically invalid domain name. +

    datagram-too-large

  • name-unresolvable

    @@ -1760,7 +1574,7 @@ combined with a couple of errors that are always possible:

  • ipv4: ipv4-socket-address
  • ipv6: ipv6-socket-address
  • -

    Import interface wasi:sockets/instance-network

    +

    Import interface wasi:sockets/instance-network@0.2.0-rc-2023-11-10

    This interface provides a value-export of the default network handle..


    Types

    @@ -1775,7 +1589,7 @@ combined with a couple of errors that are always possible:

    -

    Import interface wasi:sockets/ip-name-lookup

    +

    Import interface wasi:sockets/ip-name-lookup@0.2.0-rc-2023-11-10


    Types

    type pollable

    @@ -1790,35 +1604,21 @@ combined with a couple of errors that are always possible:

    #### `type ip-address` [`ip-address`](#ip_address)

    -#### `type ip-address-family` -[`ip-address-family`](#ip_address_family) -

    #### `resource resolve-address-stream`


    Functions

    resolve-addresses: func

    Resolve an internet host name to a list of IP addresses.

    +

    Unicode domain names are automatically converted to ASCII using IDNA encoding. +If the input is an IP address string, the address is parsed and returned +as-is without making any external requests.

    See the wasi-socket proposal README.md for a comparison with getaddrinfo.

    -

    Parameters

    - -

    This function never blocks. It either immediately fails or immediately returns successfully with a resolve-address-stream -that can be used to (asynchronously) fetch the results.

    -

    At the moment, the stream never completes successfully with 0 items. Ie. the first call -to resolve-next-address never returns ok(none). This may change in the future.

    +

    This function never blocks. It either immediately fails or immediately +returns successfully with a resolve-address-stream that can be used +to (asynchronously) fetch the results.

    Typical errors

    References:

    [method]tcp-socket.accept: func

    Accept a new client socket.

    -

    The returned socket is bound and in the Connection state.

    +

    The returned socket is bound and in the Connection state. The following properties are inherited from the listener socket:

    +

    On success, this function returns the newly accepted client socket along with a pair of streams that can be used to read & write to the connection.

    Typical errors

    -

    Host implementations must skip over transient errors returned by the native accept syscall.

    References

    [method]tcp-socket.local-address: func

    Get the bound local address.

    +

    POSIX mentions:

    +
    +

    If the socket has not been bound to a local name, the value +stored in the object pointed to by address is unspecified.

    +
    +

    WASI is stricter and requires local-address to return invalid-state when the socket hasn't been bound yet.

    Typical errors

    References

    [method]tcp-socket.remote-address: func

    -

    Get the bound remote address.

    +

    Get the remote address.

    Typical errors

    References