From 5105e106b297dcfaab09cd01d19f280389c7e005 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 6 Oct 2023 07:47:41 -0700 Subject: [PATCH] Add semicolons in WIT files For more information see WebAssembly/component-model#249. --- .github/workflows/main.yml | 2 +- wit/poll.wit | 8 ++++---- wit/streams.wit | 36 ++++++++++++++++++------------------ wit/world.wit | 6 +++--- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e210671..b456232 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,4 +11,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: WebAssembly/wit-abi-up-to-date@v15 + - uses: WebAssembly/wit-abi-up-to-date@v16 diff --git a/wit/poll.wit b/wit/poll.wit index e95762b..254f534 100644 --- a/wit/poll.wit +++ b/wit/poll.wit @@ -1,10 +1,10 @@ -package wasi:io +package wasi:io; /// A poll API intended to let users wait for I/O events on multiple handles /// at once. interface poll { /// A "pollable" handle. - resource pollable + resource pollable; /// Poll for completion on a set of pollables. /// @@ -24,11 +24,11 @@ interface poll { /// do any I/O so it doesn't fail. If any of the I/O sources identified by /// the pollables has an error, it is indicated by marking the source as /// being reaedy for I/O. - poll-list: func(in: list>) -> list + poll-list: func(in: list>) -> list; /// Poll for completion on a single pollable. /// /// This function is similar to `poll-list`, but operates on only a single /// pollable. When it returns, the handle is ready for I/O. - poll-one: func(in: borrow) + poll-one: func(in: borrow); } diff --git a/wit/streams.wit b/wit/streams.wit index eeeff50..cfeab0d 100644 --- a/wit/streams.wit +++ b/wit/streams.wit @@ -1,4 +1,4 @@ -package wasi:io +package wasi:io; /// WASI I/O is an I/O abstraction API which is currently focused on providing /// stream types. @@ -6,7 +6,7 @@ package wasi:io /// In the future, the component model is expected to add built-in stream types; /// when it does, they are expected to subsume this API. interface streams { - use poll.{pollable} + use poll.{pollable}; /// Streams provide a sequence of data and then end; once they end, they /// no longer provide any further data. @@ -58,14 +58,14 @@ interface streams { read: func( /// The maximum number of bytes to read len: u64 - ) -> result, stream-status>> + ) -> result, stream-status>>; /// Read bytes from a stream, after blocking until at least one byte can /// be read. Except for blocking, identical to `read`. blocking-read: func( /// The maximum number of bytes to read len: u64 - ) -> result, stream-status>> + ) -> result, stream-status>>; /// Skip bytes from a stream. /// @@ -82,14 +82,14 @@ interface streams { skip: func( /// The maximum number of bytes to skip. len: u64, - ) -> result> + ) -> result>; /// Skip bytes from a stream, after blocking until at least one byte /// can be skipped. Except for blocking behavior, identical to `skip`. blocking-skip: func( /// The maximum number of bytes to skip. len: u64, - ) -> result> + ) -> result>; /// Create a `pollable` which will resolve once either the specified stream /// has bytes available to read or the other end of the stream has been @@ -97,7 +97,7 @@ interface streams { /// The created `pollable` is a child resource of the `input-stream`. /// Implementations may trap if the `input-stream` is dropped before /// all derived `pollable`s created with this function are dropped. - subscribe: func() -> pollable + subscribe: func() -> pollable; } /// An error for output-stream operations. @@ -131,7 +131,7 @@ interface streams { /// When this function returns 0 bytes, the `subscribe` pollable will /// become ready when this function will report at least 1 byte, or an /// error. - check-write: func() -> result + check-write: func() -> result; /// Perform a write. This function never blocks. /// @@ -142,7 +142,7 @@ interface streams { /// the last call to check-write provided a permit. write: func( contents: list - ) -> result<_, write-error> + ) -> result<_, write-error>; /// Perform a write of up to 4096 bytes, and then flush the stream. Block /// until all of these operations are complete, or an error occurs. @@ -170,7 +170,7 @@ interface streams { /// ``` blocking-write-and-flush: func( contents: list - ) -> result<_, write-error> + ) -> result<_, write-error>; /// Request to flush buffered output. This function never blocks. /// @@ -182,11 +182,11 @@ interface streams { /// writes (`check-write` will return `ok(0)`) until the flush has /// completed. The `subscribe` pollable will become ready when the /// flush has completed and the stream can accept more writes. - flush: func() -> result<_, write-error> + flush: func() -> result<_, write-error>; /// Request to flush buffered output, and block until flush completes /// and stream is ready for writing again. - blocking-flush: func() -> result<_, write-error> + blocking-flush: func() -> result<_, write-error>; /// Create a `pollable` which will resolve once the output-stream /// is ready for more writing, or an error has occured. When this @@ -198,7 +198,7 @@ interface streams { /// The created `pollable` is a child resource of the `output-stream`. /// Implementations may trap if the `output-stream` is dropped before /// all derived `pollable`s created with this function are dropped. - subscribe: func() -> pollable + subscribe: func() -> pollable; /// Write zeroes to a stream. /// @@ -209,7 +209,7 @@ interface streams { write-zeroes: func( /// The number of zero-bytes to write len: u64 - ) -> result<_, write-error> + ) -> result<_, write-error>; /// Perform a write of up to 4096 zeroes, and then flush the stream. /// Block until all of these operations are complete, or an error @@ -238,7 +238,7 @@ interface streams { blocking-write-zeroes-and-flush: func( /// The number of zero-bytes to write len: u64 - ) -> result<_, write-error> + ) -> result<_, write-error>; /// Read from one stream and write to another. /// @@ -252,7 +252,7 @@ interface streams { src: input-stream, /// The number of bytes to splice len: u64, - ) -> result> + ) -> result>; /// Read from one stream and write to another, with blocking. /// @@ -263,7 +263,7 @@ interface streams { src: input-stream, /// The number of bytes to splice len: u64, - ) -> result> + ) -> result>; /// Forward the entire contents of an input stream to an output stream. /// @@ -280,6 +280,6 @@ interface streams { forward: func( /// The stream to read from src: input-stream - ) -> result> + ) -> result>; } } diff --git a/wit/world.wit b/wit/world.wit index 8738dba..05244a9 100644 --- a/wit/world.wit +++ b/wit/world.wit @@ -1,6 +1,6 @@ -package wasi:io +package wasi:io; world imports { - import streams - import poll + import streams; + import poll; }