Skip to content

Commit

Permalink
chore(0.3): update to wasi:[email protected]
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs committed Feb 12, 2025
1 parent 19b48d5 commit 7f3a368
Show file tree
Hide file tree
Showing 42 changed files with 957 additions and 1,862 deletions.
33 changes: 9 additions & 24 deletions wit-0.3.0-draft/deps.lock
Original file line number Diff line number Diff line change
@@ -1,37 +1,22 @@
[cli]
url = "https://github.com/WebAssembly/wasi-cli/archive/v0.2.4.tar.gz"
sha256 = "674ab0febcabe50a68122751160d243361f401d923e93e4f9c0e6f9d424d21e1"
sha512 = "70529da20c463b37aeff9fb40586e093ee3560bdacf573e8dc8ec2a380c598456294d1308aee9431745ad0fef6ac67aae53b5abb4578c7d682cd5b1485825191"
deps = ["clocks", "filesystem", "io", "random", "sockets"]
url = "https://github.com/WebAssembly/wasi-cli/archive/main.tar.gz"
subdir = "wit-0.3.0-draft"
sha256 = "9a94018c67baf2ab4475f23c164514724ca08795195184adb4b38cb8dc5d6f9c"
sha512 = "8d2f3076eb94118c5321fd18dda60c0078087dbcbed57c6b973b8fc2225670045d94a6f70f4f19c0fb0e13bbb0344325d4dce3a48417b97434344d2a2c1371fd"
deps = ["clocks", "filesystem", "random", "sockets"]

[clocks]
sha256 = "fc36267c5098ad9ac6455396b27c8ef206ca23cae74f40bd44c57be68e7849b6"
sha512 = "0deed3d3a86f284adda7991cd24c0c4aab806ba2e0cb111da80d7f99c05f10793a602b28451407cad58ab762997f60c0f6d173e919e4a0988773b455d3a410d3"

[clocks-0-3-0]
url = "https://github.com/WebAssembly/wasi-clocks/archive/main.tar.gz"
subdir = "wit-0.3.0-draft"
sha256 = "26e315db0d371495f8834edfc0e479042f94152ce677d96d54d3623d0e4ffb1e"
sha512 = "e1c76f499435841316f9287b88d8173558e64f277c321ff390556de8707a0b18dd6c1749bbb17bbbba8d523da246ef6eb05c990ceddb762e03efb2ae30cacc76"

[filesystem]
sha256 = "dd435f78b23714bd9d51ef3789c43b831549e71f54b57394a41bbf0c4da45f42"
sha512 = "d58bcf6eae908a6b2d883bcdfe456dc31aa99c848d0b3d21f710bde5bbb59ec105dbd5085004eadd0faa938530e4c29f88e589f525c080eb6d5971775a0b64ed"

[io]
sha256 = "770a73d479cda8e4c4064dd4006d2654ebcc358952079d74e41af27cf26bddbf"
sha512 = "b790f9750ac6782d9aaaa379845600b66dbde14ecee42f159c29796447eb8e61ee61f3b306e92622993b5e25298834b6ff62d7d9a04f8f18c05f07eda8f47ae0"
sha256 = "f8a82b21e18cad3498b53475666a3f00c4c1b5f030b7ed47c79262e3dbe97461"
sha512 = "0e62fe9ff3ba0572d890a2edd969e88a5c2327279cec681d3f2688ed8442820333f6041b0f0956b44941f971a6afb785bd2f5248ca0c99b51f13521496cadbcc"

[random]
sha256 = "876d81b0a777f1dc9db215fa36f45898a907188819185d6b189345f28c081a45"
sha512 = "fc6a0ed97e0525456222b28bcc49431bade826a97cb6eb52cde595908865d1ed7835c54a63b408ba82e3d49061aebb9a8725d1d2316d28c0ccb12af8ec968ab8"

[random-0-3-0]
url = "https://github.com/WebAssembly/wasi-random/archive/main.tar.gz"
subdir = "wit-0.3.0-draft"
sha256 = "7a483077cc23fc9dc7a3f067d62795663cceee7dbbd23f205934282b1164a83e"
sha512 = "b99280fd60699f781f20209659e94c0058ce6b9e973ddbd0b8865d752f88c74633485d486d5a86b709385b6e60357470d1c6fbcb3a2769af210c0b1f52417506"

[sockets]
sha256 = "e6872db116eb02f2043c4238999712de19bdb22e3c8da00af563f8b6c4dabb18"
sha512 = "28c05fe8acd691d808b6a90b950483bbf59983c02e91ed4a89b0e06c3e2a27e0f73be678979309553f0889fc3fea00c4740b007946d7285aa554dc65d56b1b7f"
sha256 = "48fa617cdf64b66adc7136e4f0c14886061e6d5134072bf8e1698b84e2579669"
sha512 = "786b8a03c14d3f529500275762a37c497ea1e6479e71028e8173aa07594beb77226904d77970a7c356ff3f59aa4a5c10f2e68537cc96b9916ff03a317b05a229"
4 changes: 1 addition & 3 deletions wit-0.3.0-draft/deps.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
cli = "https://github.com/WebAssembly/wasi-cli/archive/v0.2.4.tar.gz" # TODO: update to v0.3.0-draft and remove custom clock and random imports
clocks-0-3-0 = { url = "https://github.com/WebAssembly/wasi-clocks/archive/main.tar.gz", subdir = "wit-0.3.0-draft" }
random-0-3-0 = { url = "https://github.com/WebAssembly/wasi-random/archive/main.tar.gz", subdir = "wit-0.3.0-draft" }
cli = { url = "https://github.com/WebAssembly/wasi-cli/archive/main.tar.gz", subdir = "wit-0.3.0-draft" }
8 changes: 4 additions & 4 deletions wit-0.3.0-draft/deps/cli/command.wit
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package wasi:cli@0.2.4;
package wasi:cli@0.3.0;

@since(version = 0.2.0)
@since(version = 0.3.0)
world command {
@since(version = 0.2.0)
@since(version = 0.3.0)
include imports;

@since(version = 0.2.0)
@since(version = 0.3.0)
export run;
}
8 changes: 4 additions & 4 deletions wit-0.3.0-draft/deps/cli/environment.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@since(version = 0.2.0)
@since(version = 0.3.0)
interface environment {
/// Get the POSIX-style environment variables.
///
Expand All @@ -8,15 +8,15 @@ interface environment {
/// Morally, these are a value import, but until value imports are available
/// in the component model, this import function should return the same
/// values each time it is called.
@since(version = 0.2.0)
@since(version = 0.3.0)
get-environment: func() -> list<tuple<string, string>>;

/// Get the POSIX-style arguments to the program.
@since(version = 0.2.0)
@since(version = 0.3.0)
get-arguments: func() -> list<string>;

/// Return a path that programs should use as their initial current working
/// directory, interpreting `.` as shorthand for this.
@since(version = 0.2.0)
@since(version = 0.3.0)
initial-cwd: func() -> option<string>;
}
4 changes: 2 additions & 2 deletions wit-0.3.0-draft/deps/cli/exit.wit
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@since(version = 0.2.0)
@since(version = 0.3.0)
interface exit {
/// Exit the current instance and any linked instances.
@since(version = 0.2.0)
@since(version = 0.3.0)
exit: func(status: result);

/// Exit the current instance and any linked instances, reporting the
Expand Down
42 changes: 20 additions & 22 deletions wit-0.3.0-draft/deps/cli/imports.wit
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
package wasi:cli@0.2.4;
package wasi:cli@0.3.0;

@since(version = 0.2.0)
@since(version = 0.3.0)
world imports {
@since(version = 0.2.0)
include wasi:clocks/imports@0.2.4;
@since(version = 0.2.0)
include wasi:filesystem/imports@0.2.4;
@since(version = 0.2.0)
include wasi:sockets/imports@0.2.4;
@since(version = 0.2.0)
include wasi:random/imports@0.2.4;
@since(version = 0.2.0)
include wasi:io/imports@0.2.4;
@since(version = 0.3.0)
include wasi:clocks/imports@0.3.0;
@since(version = 0.3.0)
include wasi:filesystem/imports@0.3.0;
@since(version = 0.3.0)
include wasi:sockets/imports@0.3.0;
@since(version = 0.3.0)
include wasi:random/imports@0.3.0;

@since(version = 0.2.0)
@since(version = 0.3.0)
import environment;
@since(version = 0.2.0)
@since(version = 0.3.0)
import exit;
@since(version = 0.2.0)
@since(version = 0.3.0)
import stdin;
@since(version = 0.2.0)
@since(version = 0.3.0)
import stdout;
@since(version = 0.2.0)
@since(version = 0.3.0)
import stderr;
@since(version = 0.2.0)
@since(version = 0.3.0)
import terminal-input;
@since(version = 0.2.0)
@since(version = 0.3.0)
import terminal-output;
@since(version = 0.2.0)
@since(version = 0.3.0)
import terminal-stdin;
@since(version = 0.2.0)
@since(version = 0.3.0)
import terminal-stdout;
@since(version = 0.2.0)
@since(version = 0.3.0)
import terminal-stderr;
}
4 changes: 2 additions & 2 deletions wit-0.3.0-draft/deps/cli/run.wit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@since(version = 0.2.0)
@since(version = 0.3.0)
interface run {
/// Run the program.
@since(version = 0.2.0)
@since(version = 0.3.0)
run: func() -> result;
}
27 changes: 9 additions & 18 deletions wit-0.3.0-draft/deps/cli/stdio.wit
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
@since(version = 0.2.0)
@since(version = 0.3.0)
interface stdin {
@since(version = 0.2.0)
use wasi:io/streams@0.2.4.{input-stream};

@since(version = 0.2.0)
get-stdin: func() -> input-stream;
@since(version = 0.3.0)
get-stdin: func() -> stream<u8>;
}

@since(version = 0.2.0)
@since(version = 0.3.0)
interface stdout {
@since(version = 0.2.0)
use wasi:io/streams@0.2.4.{output-stream};

@since(version = 0.2.0)
get-stdout: func() -> output-stream;
@since(version = 0.3.0)
set-stdout: func(data: stream<u8>);
}

@since(version = 0.2.0)
@since(version = 0.3.0)
interface stderr {
@since(version = 0.2.0)
use wasi:io/streams@0.2.4.{output-stream};

@since(version = 0.2.0)
get-stderr: func() -> output-stream;
@since(version = 0.3.0)
set-stderr: func(data: stream<u8>);
}
26 changes: 13 additions & 13 deletions wit-0.3.0-draft/deps/cli/terminal.wit
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
/// In the future, this may include functions for disabling echoing,
/// disabling input buffering so that keyboard events are sent through
/// immediately, querying supported features, and so on.
@since(version = 0.2.0)
@since(version = 0.3.0)
interface terminal-input {
/// The input side of a terminal.
@since(version = 0.2.0)
@since(version = 0.3.0)
resource terminal-input;
}

Expand All @@ -15,48 +15,48 @@ interface terminal-input {
/// In the future, this may include functions for querying the terminal
/// size, being notified of terminal size changes, querying supported
/// features, and so on.
@since(version = 0.2.0)
@since(version = 0.3.0)
interface terminal-output {
/// The output side of a terminal.
@since(version = 0.2.0)
@since(version = 0.3.0)
resource terminal-output;
}

/// An interface providing an optional `terminal-input` for stdin as a
/// link-time authority.
@since(version = 0.2.0)
@since(version = 0.3.0)
interface terminal-stdin {
@since(version = 0.2.0)
@since(version = 0.3.0)
use terminal-input.{terminal-input};

/// If stdin is connected to a terminal, return a `terminal-input` handle
/// allowing further interaction with it.
@since(version = 0.2.0)
@since(version = 0.3.0)
get-terminal-stdin: func() -> option<terminal-input>;
}

/// An interface providing an optional `terminal-output` for stdout as a
/// link-time authority.
@since(version = 0.2.0)
@since(version = 0.3.0)
interface terminal-stdout {
@since(version = 0.2.0)
@since(version = 0.3.0)
use terminal-output.{terminal-output};

/// If stdout is connected to a terminal, return a `terminal-output` handle
/// allowing further interaction with it.
@since(version = 0.2.0)
@since(version = 0.3.0)
get-terminal-stdout: func() -> option<terminal-output>;
}

/// An interface providing an optional `terminal-output` for stderr as a
/// link-time authority.
@since(version = 0.2.0)
@since(version = 0.3.0)
interface terminal-stderr {
@since(version = 0.2.0)
@since(version = 0.3.0)
use terminal-output.{terminal-output};

/// If stderr is connected to a terminal, return a `terminal-output` handle
/// allowing further interaction with it.
@since(version = 0.2.0)
@since(version = 0.3.0)
get-terminal-stderr: func() -> option<terminal-output>;
}
45 changes: 0 additions & 45 deletions wit-0.3.0-draft/deps/clocks-0-3-0/monotonic-clock.wit

This file was deleted.

55 changes: 0 additions & 55 deletions wit-0.3.0-draft/deps/clocks-0-3-0/timezone.wit

This file was deleted.

Loading

0 comments on commit 7f3a368

Please sign in to comment.