Skip to content

Commit 5e9f2c2

Browse files
authored
Merge pull request #31 from WebAssembly/pch/rc-2023-11-10
set wasi:cli package version to 0.2.0-rc-2023-11-10
2 parents 93d32f3 + 89eb0d9 commit 5e9f2c2

29 files changed

+1838
-1879
lines changed

command.md

Lines changed: 482 additions & 496 deletions
Large diffs are not rendered by default.

reactor.md

Lines changed: 483 additions & 497 deletions
Large diffs are not rendered by default.

wit/command.wit

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

33
world command {
44
include reactor;

wit/deps.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
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
[filesystem]
77
url = "https://github.com/WebAssembly/wasi-filesystem/archive/main.tar.gz"
8-
sha256 = "c05155f44cf5798d15a16eaf9cdfb065d05914ed4710421a7448bb61c6decf3a"
9-
sha512 = "fb30ea13678d3f3d2002b2cc1f6dae99ee6a06eae7c408c0d558f21e5039979dd80c8ced46b1a7629ce8b050820d81462093f7b4a733ff706d0258bf5dea5657"
8+
sha256 = "05952bbc98895aa3aeda6c765a3e521016de59f993f3b60394c724640935c09c"
9+
sha512 = "2c242489801a75466986fe014d730fb3aa7b5c6e56a230c8735e6672711b58bcbe92ba78a341b78fc3ac69339e55d3859d8bb14410230f0371ee30dbd83add64"
1010

1111
[io]
1212
url = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz"
13-
sha256 = "fb76f4449eea54d06b56fc6a7ca988da51bd84a54d2021cf18da67b5e2c7ebcf"
14-
sha512 = "c005e2a91522958a9537827a49ae344e1cb39d66e85492901a86bcc7e322ba8d0a7f1a02c9b9f840c123b4ad97e297355fac98d4822536d1426d1096dd1d73ac"
13+
sha256 = "f2e6127b235c37c06be675a904d6acf08db953ea688d78c42892c6ad3bd194e4"
14+
sha512 = "32feefbc115c34bf6968cb6e9dc15e755698ee90648e5a5d84448917c36a318bd61b401195eb64330e2475e1d098bfb8dee1440d594a68e0797748762bd84ae5"
1515

1616
[random]
1717
url = "https://github.com/WebAssembly/wasi-random/archive/main.tar.gz"
18-
sha256 = "7d7c882d50baeb054a754b5766d46f5eed35a4470d887fc8b45121bfc7ac8701"
19-
sha512 = "4b8aad54da50aa44d35f6e5eea87c67bbcedd610650500ffe350c8c8d26f7ee14c49c4c4cc51ebd0ae607459095092625f27a451e52232c575b460334b5a0606"
18+
sha256 = "11afcbff9920f5f1f72b6764d01e59a5faa2c671f0c59f0c9b405778f3708745"
19+
sha512 = "cc4fa3d178559a89d9d6a376e3359b892158d1e73317c5db1f797ebc6b0b57abf2422797648d5b2b494c50cf9360720bc451cc27e15def7d278ba875805ccbf5"
2020

2121
[sockets]
2222
url = "https://github.com/WebAssembly/wasi-sockets/archive/main.tar.gz"
23-
sha256 = "e9cc9bf3e809c17f7a100f9498056e435eea133bcb0f1abd8833261f3e5ff067"
24-
sha512 = "1917e06807dc5f9f0993fbffbb9a6c8c36ab25a14ba775ffee939aca458ecd52ee796764708381f7f4166665cfcf11a5d47dc756a1e38f291b270678455b3a02"
23+
sha256 = "b5c2e9cc87cefbaef06bbe9978f9bc336da9feee2d51747bc28e10164fc46c39"
24+
sha512 = "3aea6fe0c768b27d5c5cb3adab5e60dc936198f8b677c2cf6c4d57a0460db87eb779e0b577f1240fb2a6bf3ade49919fbffe39b0137bce3242343e6091cc7510"

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/filesystem/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/deps/filesystem/types.wit

Lines changed: 3 additions & 80 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;
@@ -142,29 +143,6 @@ interface types {
142143
truncate,
143144
}
144145

145-
/// Permissions mode used by `open-at`, `change-file-permissions-at`, and
146-
/// similar.
147-
flags modes {
148-
/// True if the resource is considered readable by the containing
149-
/// filesystem.
150-
readable,
151-
/// True if the resource is considered writable by the containing
152-
/// filesystem.
153-
writable,
154-
/// True if the resource is considered executable by the containing
155-
/// filesystem. This does not apply to directories.
156-
executable,
157-
}
158-
159-
/// Access type used by `access-at`.
160-
variant access-type {
161-
/// Test for readability, writeability, or executability.
162-
access(modes),
163-
164-
/// Test whether the path exists.
165-
exists,
166-
}
167-
168146
/// Number of hard links to an inode.
169147
type link-count = u64;
170148

@@ -538,8 +516,6 @@ interface types {
538516
open-flags: open-flags,
539517
/// Flags to use for the resulting descriptor.
540518
%flags: descriptor-flags,
541-
/// Permissions to use when creating a new file.
542-
modes: modes
543519
) -> result<descriptor, error-code>;
544520

545521
/// Read the contents of a symbolic link.
@@ -588,25 +564,6 @@ interface types {
588564
new-path: string,
589565
) -> result<_, error-code>;
590566

591-
/// Check accessibility of a filesystem path.
592-
///
593-
/// Check whether the given filesystem path names an object which is
594-
/// readable, writable, or executable, or whether it exists.
595-
///
596-
/// This does not a guarantee that subsequent accesses will succeed, as
597-
/// filesystem permissions may be modified asynchronously by external
598-
/// entities.
599-
///
600-
/// Note: This is similar to `faccessat` with the `AT_EACCESS` flag in POSIX.
601-
access-at: func(
602-
/// Flags determining the method of how the path is resolved.
603-
path-flags: path-flags,
604-
/// The relative path to check.
605-
path: string,
606-
/// The type of check to perform.
607-
%type: access-type
608-
) -> result<_, error-code>;
609-
610567
/// Unlink a filesystem object that is not a directory.
611568
///
612569
/// Return `error-code::is-directory` if the path refers to a directory.
@@ -616,40 +573,6 @@ interface types {
616573
path: string,
617574
) -> result<_, error-code>;
618575

619-
/// Change the permissions of a filesystem object that is not a directory.
620-
///
621-
/// Note that the ultimate meanings of these permissions is
622-
/// filesystem-specific.
623-
///
624-
/// Note: This is similar to `fchmodat` in POSIX.
625-
change-file-permissions-at: func(
626-
/// Flags determining the method of how the path is resolved.
627-
path-flags: path-flags,
628-
/// The relative path to operate on.
629-
path: string,
630-
/// The new permissions for the filesystem object.
631-
modes: modes,
632-
) -> result<_, error-code>;
633-
634-
/// Change the permissions of a directory.
635-
///
636-
/// Note that the ultimate meanings of these permissions is
637-
/// filesystem-specific.
638-
///
639-
/// Unlike in POSIX, the `executable` flag is not reinterpreted as a "search"
640-
/// flag. `read` on a directory implies readability and searchability, and
641-
/// `execute` is not valid for directories.
642-
///
643-
/// Note: This is similar to `fchmodat` in POSIX.
644-
change-directory-permissions-at: func(
645-
/// Flags determining the method of how the path is resolved.
646-
path-flags: path-flags,
647-
/// The relative path to operate on.
648-
path: string,
649-
/// The new permissions for the directory.
650-
modes: modes,
651-
) -> result<_, error-code>;
652-
653576
/// Test whether two descriptors refer to the same filesystem object.
654577
///
655578
/// In POSIX, this corresponds to testing whether the two descriptors have the

wit/deps/filesystem/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;

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/deps/random/insecure-seed.wit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
package wasi:random@0.2.0-rc-2023-11-10;
12
/// The insecure-seed interface for seeding hash-map DoS resistance.
23
///
34
/// It is intended to be portable at least between Unix-family platforms and

wit/deps/random/insecure.wit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
package wasi:random@0.2.0-rc-2023-11-10;
12
/// The insecure interface for insecure pseudo-random numbers.
23
///
34
/// It is intended to be portable at least between Unix-family platforms and

wit/deps/random/random.wit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
package wasi:random@0.2.0-rc-2023-11-10;
12
/// WASI Random is a random data API.
23
///
34
/// It is intended to be portable at least between Unix-family platforms and

wit/deps/random/world.wit

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

33
world imports {
44
import random;

wit/deps/sockets/instance-network.wit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
/// This interface provides a value-export of the default network handle..
33
interface instance-network {
4-
use network.{network};
4+
use network.{network};
55

6-
/// Get a handle to the default network.
7-
instance-network: func() -> network;
6+
/// Get a handle to the default network.
7+
instance-network: func() -> network;
88

99
}

0 commit comments

Comments
 (0)