-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #140 from WebAssembly/pch/rc-2023-11-10
set wasi:filesystem package version to 0.2.0-rc-2023-11-10
- Loading branch information
Showing
13 changed files
with
90 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,37 @@ | |
<ul> | ||
<li>Imports: | ||
<ul> | ||
<li>interface <a href="#wasi:io_poll"><code>wasi:io/poll</code></a></li> | ||
<li>interface <a href="#wasi:io_streams"><code>wasi:io/streams</code></a></li> | ||
<li>interface <a href="#wasi:clocks_wall_clock"><code>wasi:clocks/wall-clock</code></a></li> | ||
<li>interface <a href="#wasi:filesystem_types"><code>wasi:filesystem/types</code></a></li> | ||
<li>interface <a href="#wasi:filesystem_preopens"><code>wasi:filesystem/preopens</code></a></li> | ||
<li>interface <a href="#wasi:io_error_0.2.0_rc_2023_11_10"><code>wasi:io/[email protected]</code></a></li> | ||
<li>interface <a href="#wasi:io_poll_0.2.0_rc_2023_11_10"><code>wasi:io/[email protected]</code></a></li> | ||
<li>interface <a href="#wasi:io_streams_0.2.0_rc_2023_11_10"><code>wasi:io/[email protected]</code></a></li> | ||
<li>interface <a href="#wasi:clocks_wall_clock_0.2.0_rc_2023_11_10"><code>wasi:clocks/[email protected]</code></a></li> | ||
<li>interface <a href="#wasi:filesystem_types_0.2.0_rc_2023_11_10"><code>wasi:filesystem/[email protected]</code></a></li> | ||
<li>interface <a href="#wasi:filesystem_preopens_0.2.0_rc_2023_11_10"><code>wasi:filesystem/[email protected]</code></a></li> | ||
</ul> | ||
</li> | ||
</ul> | ||
<h2><a name="wasi:io_poll">Import interface wasi:io/poll</a></h2> | ||
<h2><a name="wasi:io_error_0.2.0_rc_2023_11_10">Import interface wasi:io/[email protected]</a></h2> | ||
<hr /> | ||
<h3>Types</h3> | ||
<h4><a name="error"><code>resource error</code></a></h4> | ||
<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 | ||
this error.</p> | ||
<p>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.</p> | ||
<h5>Params</h5> | ||
<ul> | ||
<li><a name="method_error.to_debug_string.self"><code>self</code></a>: borrow<<a href="#error"><a href="#error"><code>error</code></a></a>></li> | ||
</ul> | ||
<h5>Return values</h5> | ||
<ul> | ||
<li><a name="method_error.to_debug_string.0"></a> <code>string</code></li> | ||
</ul> | ||
<h2><a name="wasi:io_poll_0.2.0_rc_2023_11_10">Import interface wasi:io/[email protected]</a></h2> | ||
<p>A poll API intended to let users wait for I/O events on multiple handles | ||
at once.</p> | ||
<hr /> | ||
|
@@ -60,18 +82,20 @@ being reaedy for I/O.</p> | |
<ul> | ||
<li><a name="poll.0"></a> list<<code>u32</code>></li> | ||
</ul> | ||
<h2><a name="wasi:io_streams">Import interface wasi:io/streams</a></h2> | ||
<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> | ||
<p>WASI I/O is an I/O abstraction API which is currently focused on providing | ||
stream types.</p> | ||
<p>In the future, the component model is expected to add built-in stream types; | ||
when it does, they are expected to subsume this API.</p> | ||
<hr /> | ||
<h3>Types</h3> | ||
<h4><a name="pollable"><code>type pollable</code></a></h4> | ||
<p><a href="#pollable"><a href="#pollable"><code>pollable</code></a></a></p> | ||
<h4><a name="error"><code>type error</code></a></h4> | ||
<p><a href="#error"><a href="#error"><code>error</code></a></a></p> | ||
<p> | ||
#### <a name="pollable">`type pollable`</a> | ||
[`pollable`](#pollable) | ||
<p> | ||
#### <a name="error">`resource error`</a> | ||
<h4><a name="stream_error"><code>variant stream-error</code></a></h4> | ||
#### <a name="stream_error">`variant stream-error`</a> | ||
<p>An error for input-stream and output-stream operations.</p> | ||
<h5>Variant Cases</h5> | ||
<ul> | ||
|
@@ -91,20 +115,6 @@ future operations. | |
<h4><a name="output_stream"><code>resource output-stream</code></a></h4> | ||
<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's suitable to assist humans in debugging this | ||
error.</p> | ||
<p>The returned string will change across platforms and hosts which | ||
means that parsing it, for example, would be a | ||
platform-compatibility hazard.</p> | ||
<h5>Params</h5> | ||
<ul> | ||
<li><a name="method_error.to_debug_string.self"><code>self</code></a>: borrow<<a href="#error"><a href="#error"><code>error</code></a></a>></li> | ||
</ul> | ||
<h5>Return values</h5> | ||
<ul> | ||
<li><a name="method_error.to_debug_string.0"></a> <code>string</code></li> | ||
</ul> | ||
<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> | ||
<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> | |
<ul> | ||
<li><a name="method_output_stream.blocking_splice.0"></a> result<<code>u64</code>, <a href="#stream_error"><a href="#stream_error"><code>stream-error</code></a></a>></li> | ||
</ul> | ||
<h2><a name="wasi:clocks_wall_clock">Import interface wasi:clocks/wall-clock</a></h2> | ||
<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> | ||
<p>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.</p> | ||
|
@@ -416,7 +426,7 @@ also known as <a href="https://en.wikipedia.org/wiki/Unix_time">Unix Time</a>.</ | |
<ul> | ||
<li><a name="resolution.0"></a> <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li> | ||
</ul> | ||
<h2><a name="wasi:filesystem_types">Import interface wasi:filesystem/types</a></h2> | ||
<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> | ||
<p>WASI filesystem is a filesystem API primarily intended to let users run WASI | ||
programs that access their files on their existing filesystems, without | ||
significant overhead.</p> | ||
|
@@ -1293,7 +1303,7 @@ errors are filesystem-related errors.</p> | |
<ul> | ||
<li><a name="filesystem_error_code.0"></a> option<<a href="#error_code"><a href="#error_code"><code>error-code</code></a></a>></li> | ||
</ul> | ||
<h2><a name="wasi:filesystem_preopens">Import interface wasi:filesystem/preopens</a></h2> | ||
<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> | ||
<hr /> | ||
<h3>Types</h3> | ||
<h4><a name="descriptor"><code>type descriptor</code></a></h4> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
[clocks] | ||
url = "https://github.com/WebAssembly/wasi-clocks/archive/main.tar.gz" | ||
sha256 = "8d6b9f7a8bf9466bdc68043c33e054878fdf09c1cc69c19c99eeadd3bb257a90" | ||
sha512 = "21b65d911930c4512bb3caa08459283fc70b1ccc5159313092334cffd6662fb92cfe90577b51829ef363e2d02530802c88f2a1f82db43964d1f8bff7ecbc794b" | ||
sha256 = "89da8eca4cd195516574c89c5b3c24a7b5af3ff2565c16753d20d3bdbc5fc60f" | ||
sha512 = "244079b3f592d58478a97adbd0bee8d49ae9dd1a3e435651ee40997b50da9fe62cfaba7e3ec7f7406d7d0288d278a43a3a0bc5150226ba40ce0f8ac6d33f7ddb" | ||
|
||
[io] | ||
url = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz" | ||
sha256 = "fb76f4449eea54d06b56fc6a7ca988da51bd84a54d2021cf18da67b5e2c7ebcf" | ||
sha512 = "c005e2a91522958a9537827a49ae344e1cb39d66e85492901a86bcc7e322ba8d0a7f1a02c9b9f840c123b4ad97e297355fac98d4822536d1426d1096dd1d73ac" | ||
sha256 = "f2e6127b235c37c06be675a904d6acf08db953ea688d78c42892c6ad3bd194e4" | ||
sha512 = "32feefbc115c34bf6968cb6e9dc15e755698ee90648e5a5d84448917c36a318bd61b401195eb64330e2475e1d098bfb8dee1440d594a68e0797748762bd84ae5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
package wasi:clocks; | ||
package wasi:clocks@0.2.0-rc-2023-11-10; | ||
|
||
world imports { | ||
import monotonic-clock; | ||
import wall-clock; | ||
import timezone; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package wasi:io@0.2.0-rc-2023-11-10; | ||
|
||
|
||
interface error { | ||
/// A resource which represents some error information. | ||
/// | ||
/// The only method provided by this resource is `to-debug-string`, | ||
/// which provides some human-readable information about the error. | ||
/// | ||
/// In the `wasi:io` package, this resource is returned through the | ||
/// `wasi:io/streams/stream-error` type. | ||
/// | ||
/// To provide more specific error information, other interfaces may | ||
/// provide functions to further "downcast" this error into more specific | ||
/// error information. For example, `error`s returned in streams derived | ||
/// from filesystem types to be described using the filesystem's own | ||
/// error-code type, using the function | ||
/// `wasi:filesystem/types/filesystem-error-code`, which takes a parameter | ||
/// `borrow<error>` and returns | ||
/// `option<wasi:filesystem/types/error-code>`. | ||
/// | ||
/// The set of functions which can "downcast" an `error` into a more | ||
/// concrete type is open. | ||
resource error { | ||
/// 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. | ||
to-debug-string: func() -> string; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package wasi:io; | ||
package wasi:io@0.2.0-rc-2023-11-10; | ||
|
||
world imports { | ||
import streams; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package wasi:filesystem@0.2.0-rc-2023-11-10; | ||
|
||
interface preopens { | ||
use types.{descriptor}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package wasi:filesystem; | ||
package wasi:filesystem@0.2.0-rc-2023-11-10; | ||
|
||
world imports { | ||
import types; | ||
|