Skip to content

Commit

Permalink
chore: pin v0.2.0 (#19)
Browse files Browse the repository at this point in the history
Signed-off-by: Bailey Hayes <[email protected]>
  • Loading branch information
ricochet authored Feb 8, 2024
1 parent c40f1d3 commit 45c8a81
Show file tree
Hide file tree
Showing 10 changed files with 841 additions and 19 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: WebAssembly/wit-abi-up-to-date@v6
with:
wit-abi-tag: wit-abi-0.6.0
- uses: WebAssembly/wit-abi-up-to-date@v17
wit-bindgen: '0.17.0'
812 changes: 812 additions & 0 deletions imports.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wit/container.wit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// a Container is a collection of objects
interface container {
use wasi:io/streams@0.2.0-rc-2023-11-10.{
use wasi:io/streams@0.2.0.{
input-stream,
output-stream,
};
Expand Down
6 changes: 3 additions & 3 deletions wit/deps.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[io]
url = "https://github.com/WebAssembly/wasi-io/archive/v0.2.0-rc-2023-11-10.tar.gz"
sha256 = "f2e6127b235c37c06be675a904d6acf08db953ea688d78c42892c6ad3bd194e4"
sha512 = "32feefbc115c34bf6968cb6e9dc15e755698ee90648e5a5d84448917c36a318bd61b401195eb64330e2475e1d098bfb8dee1440d594a68e0797748762bd84ae5"
url = "https://github.com/WebAssembly/wasi-io/archive/v0.2.0.tar.gz"
sha256 = "7210e5653539a15478f894d4da24cc69d61924cbcba21d2804d69314a88e5a4c"
sha512 = "49184a1b0945a889abd52d25271172ed3dc2db6968fcdddb1bab7ee0081f4a3eeee0977ad2291126a37631c0d86eeea75d822fa8af224c422134500bf9f0f2bb"
2 changes: 1 addition & 1 deletion wit/deps.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
io = "https://github.com/WebAssembly/wasi-io/archive/v0.2.0-rc-2023-11-10.tar.gz"
io = "https://github.com/WebAssembly/wasi-io/archive/v0.2.0.tar.gz"
2 changes: 1 addition & 1 deletion wit/deps/io/error.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:io@0.2.0-rc-2023-11-10;
package wasi:io@0.2.0;


interface error {
Expand Down
4 changes: 2 additions & 2 deletions wit/deps/io/poll.wit
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package wasi:io@0.2.0-rc-2023-11-10;
package wasi:io@0.2.0;

/// A poll API intended to let users wait for I/O events on multiple handles
/// at once.
interface poll {
/// `pollable` epresents a single I/O event which may be ready, or not.
/// `pollable` represents a single I/O event which may be ready, or not.
resource pollable {

/// Return the readiness of a pollable. This function never blocks.
Expand Down
23 changes: 17 additions & 6 deletions wit/deps/io/streams.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:io@0.2.0-rc-2023-11-10;
package wasi:io@0.2.0;

/// WASI I/O is an I/O abstraction API which is currently focused on providing
/// stream types.
Expand Down Expand Up @@ -32,6 +32,11 @@ interface streams {
resource input-stream {
/// Perform a non-blocking read from the stream.
///
/// When the source of a `read` is binary data, the bytes from the source
/// are returned verbatim. When the source of a `read` is known to the
/// implementation to be text, bytes containing the UTF-8 encoding of the
/// text are returned.
///
/// This function returns a list of bytes containing the read data,
/// when successful. The returned list will contain up to `len` bytes;
/// it may return fewer than requested, but not more. The list is
Expand Down Expand Up @@ -111,6 +116,12 @@ interface streams {

/// Perform a write. This function never blocks.
///
/// When the destination of a `write` is binary data, the bytes from
/// `contents` are written verbatim. When the destination of a `write` is
/// known to the implementation to be text, the bytes of `contents` are
/// transcoded from UTF-8 into the encoding of the destination and then
/// written.
///
/// Precondition: check-write gave permit of Ok(n) and contents has a
/// length of less than or equal to n. Otherwise, this function will trap.
///
Expand All @@ -131,7 +142,7 @@ interface streams {
/// let pollable = this.subscribe();
/// while !contents.is_empty() {
/// // Wait for the stream to become writable
/// poll-one(pollable);
/// pollable.block();
/// let Ok(n) = this.check-write(); // eliding error handling
/// let len = min(n, contents.len());
/// let (chunk, rest) = contents.split_at(len);
Expand All @@ -140,7 +151,7 @@ interface streams {
/// }
/// this.flush();
/// // Wait for completion of `flush`
/// poll-one(pollable);
/// pollable.block();
/// // Check for any errors that arose during `flush`
/// let _ = this.check-write(); // eliding error handling
/// ```
Expand Down Expand Up @@ -178,7 +189,7 @@ interface streams {

/// Write zeroes to a stream.
///
/// this should be used precisely like `write` with the exact same
/// This should be used precisely like `write` with the exact same
/// preconditions (must use check-write first), but instead of
/// passing a list of bytes, you simply pass the number of zero-bytes
/// that should be written.
Expand All @@ -199,15 +210,15 @@ interface streams {
/// let pollable = this.subscribe();
/// while num_zeroes != 0 {
/// // Wait for the stream to become writable
/// poll-one(pollable);
/// pollable.block();
/// let Ok(n) = this.check-write(); // eliding error handling
/// let len = min(n, num_zeroes);
/// this.write-zeroes(len); // eliding error handling
/// num_zeroes -= len;
/// }
/// this.flush();
/// // Wait for completion of `flush`
/// poll-one(pollable);
/// pollable.block();
/// // Check for any errors that arose during `flush`
/// let _ = this.check-write(); // eliding error handling
/// ```
Expand Down
2 changes: 1 addition & 1 deletion wit/deps/io/world.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:io@0.2.0-rc-2023-11-10;
package wasi:io@0.2.0;

world imports {
import streams;
Expand Down
2 changes: 1 addition & 1 deletion wit/types.wit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Types used by blobstore
interface types {
use wasi:io/streams@0.2.0-rc-2023-11-10.{input-stream, output-stream};
use wasi:io/streams@0.2.0.{input-stream, output-stream};

// name of a container, a collection of objects.
// The container name may be any valid UTF-8 string.
Expand Down

0 comments on commit 45c8a81

Please sign in to comment.