Skip to content

Commit 13e02f3

Browse files
author
Pat Hickey
authored
Merge pull request #140 from WebAssembly/pch/rc-2023-11-10
set wasi:filesystem package version to 0.2.0-rc-2023-11-10
2 parents 977377b + 3180d00 commit 13e02f3

13 files changed

+90
-109
lines changed

imports.md

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,37 @@
22
<ul>
33
<li>Imports:
44
<ul>
5-
<li>interface <a href="#wasi:io_poll"><code>wasi:io/poll</code></a></li>
6-
<li>interface <a href="#wasi:io_streams"><code>wasi:io/streams</code></a></li>
7-
<li>interface <a href="#wasi:clocks_wall_clock"><code>wasi:clocks/wall-clock</code></a></li>
8-
<li>interface <a href="#wasi:filesystem_types"><code>wasi:filesystem/types</code></a></li>
9-
<li>interface <a href="#wasi:filesystem_preopens"><code>wasi:filesystem/preopens</code></a></li>
5+
<li>interface <a href="#wasi:io_error_0.2.0_rc_2023_11_10"><code>wasi:io/[email protected]</code></a></li>
6+
<li>interface <a href="#wasi:io_poll_0.2.0_rc_2023_11_10"><code>wasi:io/[email protected]</code></a></li>
7+
<li>interface <a href="#wasi:io_streams_0.2.0_rc_2023_11_10"><code>wasi:io/[email protected]</code></a></li>
8+
<li>interface <a href="#wasi:clocks_wall_clock_0.2.0_rc_2023_11_10"><code>wasi:clocks/[email protected]</code></a></li>
9+
<li>interface <a href="#wasi:filesystem_types_0.2.0_rc_2023_11_10"><code>wasi:filesystem/[email protected]</code></a></li>
10+
<li>interface <a href="#wasi:filesystem_preopens_0.2.0_rc_2023_11_10"><code>wasi:filesystem/[email protected]</code></a></li>
1011
</ul>
1112
</li>
1213
</ul>
13-
<h2><a name="wasi:io_poll">Import interface wasi:io/poll</a></h2>
14+
<h2><a name="wasi:io_error_0.2.0_rc_2023_11_10">Import interface wasi:io/[email protected]</a></h2>
15+
<hr />
16+
<h3>Types</h3>
17+
<h4><a name="error"><code>resource error</code></a></h4>
18+
<hr />
19+
<h3>Functions</h3>
20+
<h4><a name="method_error.to_debug_string"><code>[method]error.to-debug-string: func</code></a></h4>
21+
<p>Returns a string that is suitable to assist humans in debugging
22+
this error.</p>
23+
<p>WARNING: The returned string should not be consumed mechanically!
24+
It may change across platforms, hosts, or other implementation
25+
details. Parsing this string is a major platform-compatibility
26+
hazard.</p>
27+
<h5>Params</h5>
28+
<ul>
29+
<li><a name="method_error.to_debug_string.self"><code>self</code></a>: borrow&lt;<a href="#error"><a href="#error"><code>error</code></a></a>&gt;</li>
30+
</ul>
31+
<h5>Return values</h5>
32+
<ul>
33+
<li><a name="method_error.to_debug_string.0"></a> <code>string</code></li>
34+
</ul>
35+
<h2><a name="wasi:io_poll_0.2.0_rc_2023_11_10">Import interface wasi:io/[email protected]</a></h2>
1436
<p>A poll API intended to let users wait for I/O events on multiple handles
1537
at once.</p>
1638
<hr />
@@ -60,18 +82,20 @@ being reaedy for I/O.</p>
6082
<ul>
6183
<li><a name="poll.0"></a> list&lt;<code>u32</code>&gt;</li>
6284
</ul>
63-
<h2><a name="wasi:io_streams">Import interface wasi:io/streams</a></h2>
85+
<h2><a name="wasi:io_streams_0.2.0_rc_2023_11_10">Import interface wasi:io/streams@0.2.0-rc-2023-11-10</a></h2>
6486
<p>WASI I/O is an I/O abstraction API which is currently focused on providing
6587
stream types.</p>
6688
<p>In the future, the component model is expected to add built-in stream types;
6789
when it does, they are expected to subsume this API.</p>
6890
<hr />
6991
<h3>Types</h3>
70-
<h4><a name="pollable"><code>type pollable</code></a></h4>
71-
<p><a href="#pollable"><a href="#pollable"><code>pollable</code></a></a></p>
92+
<h4><a name="error"><code>type error</code></a></h4>
93+
<p><a href="#error"><a href="#error"><code>error</code></a></a></p>
94+
<p>
95+
#### <a name="pollable">`type pollable`</a>
96+
[`pollable`](#pollable)
7297
<p>
73-
#### <a name="error">`resource error`</a>
74-
<h4><a name="stream_error"><code>variant stream-error</code></a></h4>
98+
#### <a name="stream_error">`variant stream-error`</a>
7599
<p>An error for input-stream and output-stream operations.</p>
76100
<h5>Variant Cases</h5>
77101
<ul>
@@ -91,20 +115,6 @@ future operations.
91115
<h4><a name="output_stream"><code>resource output-stream</code></a></h4>
92116
<hr />
93117
<h3>Functions</h3>
94-
<h4><a name="method_error.to_debug_string"><code>[method]error.to-debug-string: func</code></a></h4>
95-
<p>Returns a string that's suitable to assist humans in debugging this
96-
error.</p>
97-
<p>The returned string will change across platforms and hosts which
98-
means that parsing it, for example, would be a
99-
platform-compatibility hazard.</p>
100-
<h5>Params</h5>
101-
<ul>
102-
<li><a name="method_error.to_debug_string.self"><code>self</code></a>: borrow&lt;<a href="#error"><a href="#error"><code>error</code></a></a>&gt;</li>
103-
</ul>
104-
<h5>Return values</h5>
105-
<ul>
106-
<li><a name="method_error.to_debug_string.0"></a> <code>string</code></li>
107-
</ul>
108118
<h4><a name="method_input_stream.read"><code>[method]input-stream.read: func</code></a></h4>
109119
<p>Perform a non-blocking read from the stream.</p>
110120
<p>This function returns a list of bytes containing the read data,
@@ -375,7 +385,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
375385
<ul>
376386
<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>
377387
</ul>
378-
<h2><a name="wasi:clocks_wall_clock">Import interface wasi:clocks/wall-clock</a></h2>
388+
<h2><a name="wasi:clocks_wall_clock_0.2.0_rc_2023_11_10">Import interface wasi:clocks/wall-clock@0.2.0-rc-2023-11-10</a></h2>
379389
<p>WASI Wall Clock is a clock API intended to let users query the current
380390
time. The name &quot;wall&quot; makes an analogy to a &quot;clock on the wall&quot;, which
381391
is not necessarily monotonic as it may be reset.</p>
@@ -416,7 +426,7 @@ also known as <a href="https://en.wikipedia.org/wiki/Unix_time">Unix Time</a>.</
416426
<ul>
417427
<li><a name="resolution.0"></a> <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
418428
</ul>
419-
<h2><a name="wasi:filesystem_types">Import interface wasi:filesystem/types</a></h2>
429+
<h2><a name="wasi:filesystem_types_0.2.0_rc_2023_11_10">Import interface wasi:filesystem/types@0.2.0-rc-2023-11-10</a></h2>
420430
<p>WASI filesystem is a filesystem API primarily intended to let users run WASI
421431
programs that access their files on their existing filesystems, without
422432
significant overhead.</p>
@@ -1293,7 +1303,7 @@ errors are filesystem-related errors.</p>
12931303
<ul>
12941304
<li><a name="filesystem_error_code.0"></a> option&lt;<a href="#error_code"><a href="#error_code"><code>error-code</code></a></a>&gt;</li>
12951305
</ul>
1296-
<h2><a name="wasi:filesystem_preopens">Import interface wasi:filesystem/preopens</a></h2>
1306+
<h2><a name="wasi:filesystem_preopens_0.2.0_rc_2023_11_10">Import interface wasi:filesystem/preopens@0.2.0-rc-2023-11-10</a></h2>
12971307
<hr />
12981308
<h3>Types</h3>
12991309
<h4><a name="descriptor"><code>type descriptor</code></a></h4>

wit/deps.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[clocks]
22
url = "https://github.com/WebAssembly/wasi-clocks/archive/main.tar.gz"
3-
sha256 = "8d6b9f7a8bf9466bdc68043c33e054878fdf09c1cc69c19c99eeadd3bb257a90"
4-
sha512 = "21b65d911930c4512bb3caa08459283fc70b1ccc5159313092334cffd6662fb92cfe90577b51829ef363e2d02530802c88f2a1f82db43964d1f8bff7ecbc794b"
3+
sha256 = "89da8eca4cd195516574c89c5b3c24a7b5af3ff2565c16753d20d3bdbc5fc60f"
4+
sha512 = "244079b3f592d58478a97adbd0bee8d49ae9dd1a3e435651ee40997b50da9fe62cfaba7e3ec7f7406d7d0288d278a43a3a0bc5150226ba40ce0f8ac6d33f7ddb"
55

66
[io]
77
url = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz"
8-
sha256 = "fb76f4449eea54d06b56fc6a7ca988da51bd84a54d2021cf18da67b5e2c7ebcf"
9-
sha512 = "c005e2a91522958a9537827a49ae344e1cb39d66e85492901a86bcc7e322ba8d0a7f1a02c9b9f840c123b4ad97e297355fac98d4822536d1426d1096dd1d73ac"
8+
sha256 = "f2e6127b235c37c06be675a904d6acf08db953ea688d78c42892c6ad3bd194e4"
9+
sha512 = "32feefbc115c34bf6968cb6e9dc15e755698ee90648e5a5d84448917c36a318bd61b401195eb64330e2475e1d098bfb8dee1440d594a68e0797748762bd84ae5"

wit/deps/clocks/monotonic-clock.wit

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
package wasi:clocks@0.2.0-rc-2023-11-10;
12
/// WASI Monotonic Clock is a clock API intended to let users measure elapsed
23
/// time.
34
///
@@ -9,7 +10,7 @@
910
///
1011
/// It is intended for measuring elapsed time.
1112
interface monotonic-clock {
12-
use wasi:io/poll.{pollable};
13+
use wasi:io/poll@0.2.0-rc-2023-11-10.{pollable};
1314

1415
/// An instant in time, in nanoseconds. An instant is relative to an
1516
/// unspecified initial value, and can only be compared to instances from

wit/deps/clocks/timezone.wit

Lines changed: 0 additions & 48 deletions
This file was deleted.

wit/deps/clocks/wall-clock.wit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
package wasi:clocks@0.2.0-rc-2023-11-10;
12
/// WASI Wall Clock is a clock API intended to let users query the current
23
/// time. The name "wall" makes an analogy to a "clock on the wall", which
34
/// is not necessarily monotonic as it may be reset.

wit/deps/clocks/world.wit

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
package wasi:clocks;
1+
package wasi:clocks@0.2.0-rc-2023-11-10;
22

33
world imports {
44
import monotonic-clock;
55
import wall-clock;
6-
import timezone;
76
}

wit/deps/io/error.wit

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package wasi:io@0.2.0-rc-2023-11-10;
2+
3+
4+
interface error {
5+
/// A resource which represents some error information.
6+
///
7+
/// The only method provided by this resource is `to-debug-string`,
8+
/// which provides some human-readable information about the error.
9+
///
10+
/// In the `wasi:io` package, this resource is returned through the
11+
/// `wasi:io/streams/stream-error` type.
12+
///
13+
/// To provide more specific error information, other interfaces may
14+
/// provide functions to further "downcast" this error into more specific
15+
/// error information. For example, `error`s returned in streams derived
16+
/// from filesystem types to be described using the filesystem's own
17+
/// error-code type, using the function
18+
/// `wasi:filesystem/types/filesystem-error-code`, which takes a parameter
19+
/// `borrow<error>` and returns
20+
/// `option<wasi:filesystem/types/error-code>`.
21+
///
22+
/// The set of functions which can "downcast" an `error` into a more
23+
/// concrete type is open.
24+
resource error {
25+
/// Returns a string that is suitable to assist humans in debugging
26+
/// this error.
27+
///
28+
/// WARNING: The returned string should not be consumed mechanically!
29+
/// It may change across platforms, hosts, or other implementation
30+
/// details. Parsing this string is a major platform-compatibility
31+
/// hazard.
32+
to-debug-string: func() -> string;
33+
}
34+
}

wit/deps/io/poll.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:io;
1+
package wasi:io@0.2.0-rc-2023-11-10;
22

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

wit/deps/io/streams.wit

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
package wasi:io;
1+
package wasi:io@0.2.0-rc-2023-11-10;
22

33
/// WASI I/O is an I/O abstraction API which is currently focused on providing
44
/// stream types.
55
///
66
/// In the future, the component model is expected to add built-in stream types;
77
/// when it does, they are expected to subsume this API.
88
interface streams {
9+
use error.{error};
910
use poll.{pollable};
1011

1112
/// An error for input-stream and output-stream operations.
@@ -20,26 +21,6 @@ interface streams {
2021
closed
2122
}
2223

23-
/// Contextual error information about the last failure that happened on
24-
/// a read, write, or flush from an `input-stream` or `output-stream`.
25-
///
26-
/// This type is returned through the `stream-error` type whenever an
27-
/// operation on a stream directly fails or an error is discovered
28-
/// after-the-fact, for example when a write's failure shows up through a
29-
/// later `flush` or `check-write`.
30-
///
31-
/// Interfaces such as `wasi:filesystem/types` provide functionality to
32-
/// further "downcast" this error into interface-specific error information.
33-
resource error {
34-
/// Returns a string that's suitable to assist humans in debugging this
35-
/// error.
36-
///
37-
/// The returned string will change across platforms and hosts which
38-
/// means that parsing it, for example, would be a
39-
/// platform-compatibility hazard.
40-
to-debug-string: func() -> string;
41-
}
42-
4324
/// An input bytestream.
4425
///
4526
/// `input-stream`s are *non-blocking* to the extent practical on underlying

wit/deps/io/world.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:io;
1+
package wasi:io@0.2.0-rc-2023-11-10;
22

33
world imports {
44
import streams;

wit/preopens.wit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package wasi:filesystem@0.2.0-rc-2023-11-10;
2+
13
interface preopens {
24
use types.{descriptor};
35

wit/types.wit

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
package wasi:filesystem@0.2.0-rc-2023-11-10;
12
/// WASI filesystem is a filesystem API primarily intended to let users run WASI
23
/// programs that access their files on their existing filesystems, without
34
/// significant overhead.
@@ -23,8 +24,8 @@
2324
///
2425
/// [WASI filesystem path resolution]: https://github.com/WebAssembly/wasi-filesystem/blob/main/path-resolution.md
2526
interface types {
26-
use wasi:io/streams.{input-stream, output-stream, error};
27-
use wasi:clocks/wall-clock.{datetime};
27+
use wasi:io/streams@0.2.0-rc-2023-11-10.{input-stream, output-stream, error};
28+
use wasi:clocks/wall-clock@0.2.0-rc-2023-11-10.{datetime};
2829

2930
/// File size or length of a region within a file.
3031
type filesize = u64;

wit/world.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:filesystem;
1+
package wasi:filesystem@0.2.0-rc-2023-11-10;
22

33
world imports {
44
import types;

0 commit comments

Comments
 (0)