Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wit: update deps and require semicolons #61

Merged
merged 4 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,4 @@ jobs:
curl -Lo 'wit-deps' https://github.com/bytecodealliance/wit-deps/releases/download/v0.3.2/wit-deps-x86_64-unknown-linux-musl
chmod +x ./wit-deps
./wit-deps lock --check

- uses: WebAssembly/wit-abi-up-to-date@v13
with:
wit-abi-tag: wit-abi-0.11.0
- uses: WebAssembly/wit-abi-up-to-date@v16
552 changes: 295 additions & 257 deletions proxy.md

Large diffs are not rendered by default.

29 changes: 12 additions & 17 deletions wit/deps.lock
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
[cli]
url = "https://github.com/WebAssembly/wasi-cli/archive/main.tar.gz"
sha256 = "f21b7722b9225b7ff4f040a67daacd4e412fe2c53c982568a2c25b97fc85d2a2"
sha512 = "ceec4b906f94ba53731dd9428e7e62b964de2284d6aa7cb3436cb856ca89405b0ca8b02e8a8d4575204b9e72dac0e3b29690221ca438324b89e0084117f1700f"
sha256 = "bf57bb59e137f1dea6521409137e46dbdcd0a78d419ac2313b59fb21332718cd"
sha512 = "36a793525eba4921f0bd55bc445465e86fc7ff8fcf3e5bb61108d35e4d791950b107b456ccadf65897a0a5cd201a5955741c9c1fecb533fca99e8bae478a2dbf"

[clocks]
url = "https://github.com/WebAssembly/wasi-clocks/archive/main.tar.gz"
sha256 = "1ed7e35b3f9738663854f0dd92a95bfadc410ea07170501f5c2fec0cc24e3d57"
sha512 = "ef1e23704a8a8436fd3718593d4c4d8b6d1c64dad3595b7496c0888ca14b725046f2900109800faca1bc8c14f237cdcaca791dba8284e1ad50105ab2d036825b"
sha256 = "74844f8bf1d356bb44aab64a2f917d7a3bcb6d6924662d2e3909aeabda01bea6"
sha512 = "ef21339a60a3f4a37eb48ab81b411c1f2ed11c9b23da04d1e384c07dd4cc75f1a433ce7b46201c693b7a59b51c73d888bc41c78ad204fe32d8a312a9f9a48eb0"

[filesystem]
url = "https://github.com/WebAssembly/wasi-filesystem/archive/main.tar.gz"
sha256 = "dc170645d8aa52f2f94ab8f71093fa0c101e509ed1a07318995dc0395e9d6cf2"
sha512 = "3195a3e0f9ec52c3a91c4b4fde0547694236c7b29bceecb7f38634894fafd809c69ed1c1c9acbf225b2d5d00f5036d70371c9fed121d85028162b202035cabef"
sha256 = "ca8364780922eddd53ec77f9152c77486db3d7052f6a5902ccc1648d5494050c"
sha512 = "ef05d9d7d5c08bc6a701a65c5af1981f30b2eb5b1c3dc5ca39a69248be8ab7cb3b17c5d181a010149dd491846fa5a7ac4f9165b06e628f31227e02dbdd8b86f5"

[io]
url = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz"
sha256 = "6e18239b0e20d1a3e6343cb961ebfd2c663ba7feb4c1aa3744b756fbdd1fb5b8"
sha512 = "53169b6e4fba0b2cf5fcf808f76e7fbb7cabb6ed66ab53f77d0966e7448312ccbe8571880ef4fc2ee86fbd6ba19bc48d46e10d22dcac6c51d217e8d7127c32db"

[poll]
url = "https://github.com/WebAssembly/wasi-poll/archive/main.tar.gz"
sha256 = "d4c27124f4c137eb538b5c92ba5858ed9042e11b24a2eef85d14becd0b7f55de"
sha512 = "422c01b273b4b1377ece6f2e4ba0dfc609ca8ef30a3e0be0e172e1303fcf7b3ca4c470f4dea6c51bdf114b0f5c871ebc4934dfe3bf217d66ea689748df2b1e55"
sha256 = "a00c29dd57dc224e8ce28b793b19c1b1001dcdbdc229ed451c3df1db91841b34"
sha512 = "8558085eeb5689209101cdfbc9782953d559ad14ce77260fe2f7cc472482d568f65cad9e6a688d40c634c6c54c608f27e27e481633446114d6fdead93d4e34c5"

[random]
url = "https://github.com/WebAssembly/wasi-random/archive/main.tar.gz"
sha256 = "9b622463e597b9ca94f41e4eaae589a77be38f71b4723142b60246ffed8eaae4"
sha512 = "21f03ca1e595b80d7ced522de1a47446526b49b900e2fb26fcbf410ce6aa267dbf247aebf3fbfa8123b46fc1a828e2fd64fb1e0198b40161a3257e8d86fd4546"
sha256 = "7d7c882d50baeb054a754b5766d46f5eed35a4470d887fc8b45121bfc7ac8701"
sha512 = "4b8aad54da50aa44d35f6e5eea87c67bbcedd610650500ffe350c8c8d26f7ee14c49c4c4cc51ebd0ae607459095092625f27a451e52232c575b460334b5a0606"

[sockets]
url = "https://github.com/WebAssembly/wasi-sockets/archive/main.tar.gz"
sha256 = "871c211b12d87a5da87c42353338b652260840897efcd37e2afba3b9290058fc"
sha512 = "e436a5ff3145ca85d702a086499c03488523483dd3addc8d71e4946e9c186355291551bb6d38b157173836fcc318182403e6dba970de4512f6cfb3374ccad6b9"
sha256 = "e9cc9bf3e809c17f7a100f9498056e435eea133bcb0f1abd8833261f3e5ff067"
sha512 = "1917e06807dc5f9f0993fbffbb9a6c8c36ab25a14ba775ffee939aca458ecd52ee796764708381f7f4166665cfcf11a5d47dc756a1e38f291b270678455b3a02"
1 change: 0 additions & 1 deletion wit/deps.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
io = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz"
cli = "https://github.com/WebAssembly/wasi-cli/archive/main.tar.gz"
poll = "https://github.com/WebAssembly/wasi-poll/archive/main.tar.gz"
random = "https://github.com/WebAssembly/wasi-random/archive/main.tar.gz"
clocks = "https://github.com/WebAssembly/wasi-clocks/archive/main.tar.gz"
# not used by http/proxy, but included to allow full contents of wasi-cli to validate
Expand Down
28 changes: 4 additions & 24 deletions wit/deps/cli/command.wit
Original file line number Diff line number Diff line change
@@ -1,27 +1,7 @@
package wasi:cli
package wasi:cli;

world command {
import wasi:clocks/wall-clock
import wasi:clocks/monotonic-clock
import wasi:clocks/timezone
import wasi:filesystem/types
import wasi:sockets/instance-network
import wasi:sockets/ip-name-lookup
import wasi:sockets/network
import wasi:sockets/tcp-create-socket
import wasi:sockets/tcp
import wasi:sockets/udp-create-socket
import wasi:sockets/udp
import wasi:random/random
import wasi:random/insecure
import wasi:random/insecure-seed
import wasi:poll/poll
import wasi:io/streams
import environment
import preopens
import exit
import stdin
import stdout
import stderr
export run
include reactor;

export run;
}
8 changes: 6 additions & 2 deletions wit/deps/cli/environment.wit
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ 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.
get-environment: func() -> list<tuple<string, string>>
get-environment: func() -> list<tuple<string, string>>;

/// Get the POSIX-style arguments to the program.
get-arguments: func() -> list<string>
get-arguments: func() -> list<string>;

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

This file was deleted.

32 changes: 32 additions & 0 deletions wit/deps/cli/reactor.wit
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package wasi:cli;

world reactor {
import wasi:clocks/wall-clock;
import wasi:clocks/monotonic-clock;
import wasi:clocks/timezone;
import wasi:filesystem/types;
import wasi:filesystem/preopens;
import wasi:sockets/instance-network;
import wasi:sockets/ip-name-lookup;
import wasi:sockets/network;
import wasi:sockets/tcp-create-socket;
import wasi:sockets/tcp;
import wasi:sockets/udp-create-socket;
import wasi:sockets/udp;
import wasi:random/random;
import wasi:random/insecure;
import wasi:random/insecure-seed;
import wasi:io/poll;
import wasi:io/streams;

import environment;
import exit;
import stdin;
import stdout;
import stderr;
import terminal-input;
import terminal-output;
import terminal-stdin;
import terminal-stdout;
import terminal-stderr;
}
2 changes: 1 addition & 1 deletion wit/deps/cli/run.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
interface run {
/// Run the program.
run: func() -> result
run: func() -> result;
}
12 changes: 6 additions & 6 deletions wit/deps/cli/stdio.wit
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
interface stdin {
use wasi:io/streams.{input-stream}
use wasi:io/streams.{input-stream};

get-stdin: func() -> input-stream
get-stdin: func() -> input-stream;
}

interface stdout {
use wasi:io/streams.{output-stream}
use wasi:io/streams.{output-stream};

get-stdout: func() -> output-stream
get-stdout: func() -> output-stream;
}

interface stderr {
use wasi:io/streams.{output-stream}
use wasi:io/streams.{output-stream};

get-stderr: func() -> output-stream
get-stderr: func() -> output-stream;
}
28 changes: 8 additions & 20 deletions wit/deps/cli/terminal.wit
Original file line number Diff line number Diff line change
@@ -1,59 +1,47 @@
interface terminal-input {
/// The input side of a terminal.
///
/// This [represents a resource](https://github.com/WebAssembly/WASI/blob/main/docs/WitInWasi.md#Resources).
type terminal-input = u32
resource terminal-input;

// 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.

/// Dispose of the specified terminal-input after which it may no longer
/// be used.
drop-terminal-input: func(this: terminal-input)
}

interface terminal-output {
/// The output side of a terminal.
///
/// This [represents a resource](https://github.com/WebAssembly/WASI/blob/main/docs/WitInWasi.md#Resources).
type terminal-output = u32
resource terminal-output;

// In the future, this may include functions for querying the terminal
// size, being notified of terminal size changes, querying supported
// features, and so on.

/// Dispose of the specified terminal-output, after which it may no longer
/// be used.
drop-terminal-output: func(this: terminal-output)
}

/// An interface providing an optional `terminal-input` for stdin as a
/// link-time authority.
interface terminal-stdin {
use terminal-input.{terminal-input}
use terminal-input.{terminal-input};

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

/// An interface providing an optional `terminal-output` for stdout as a
/// link-time authority.
interface terminal-stdout {
use terminal-output.{terminal-output}
use terminal-output.{terminal-output};

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

/// An interface providing an optional `terminal-output` for stderr as a
/// link-time authority.
interface terminal-stderr {
use terminal-output.{terminal-output}
use terminal-output.{terminal-output};

/// If stderr is connected to a terminal, return a `terminal-output` handle
/// allowing further interaction with it.
get-terminal-stderr: func() -> option<terminal-output>
get-terminal-stderr: func() -> option<terminal-output>;
}
10 changes: 5 additions & 5 deletions wit/deps/clocks/monotonic-clock.wit
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@
///
/// It is intended for measuring elapsed time.
interface monotonic-clock {
use wasi:poll/poll.{pollable}
use wasi:io/poll.{pollable};

/// A timestamp in nanoseconds.
type instant = u64
type instant = u64;

/// Read the current value of the clock.
///
/// The clock is monotonic, therefore calling this function repeatedly will
/// produce a sequence of non-decreasing values.
now: func() -> instant
now: func() -> instant;

/// Query the resolution of the clock.
resolution: func() -> instant
resolution: func() -> instant;

/// Create a `pollable` which will resolve once the specified time has been
/// reached.
subscribe: func(
when: instant,
absolute: bool
) -> pollable
) -> pollable;
}
19 changes: 3 additions & 16 deletions wit/deps/clocks/timezone.wit
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
interface timezone {
use wall-clock.{datetime}

/// A timezone.
///
/// In timezones that recognize daylight saving time, also known as daylight
/// time and summer time, the information returned from the functions varies
/// over time to reflect these adjustments.
///
/// This [represents a resource](https://github.com/WebAssembly/WASI/blob/main/docs/WitInWasi.md#Resources).
type timezone = u32
use wall-clock.{datetime};

/// Return information needed to display the given `datetime`. This includes
/// the UTC offset, the time zone name, and a flag indicating whether
Expand All @@ -17,14 +8,10 @@ interface timezone {
/// If the timezone cannot be determined for the given `datetime`, return a
/// `timezone-display` for `UTC` with a `utc-offset` of 0 and no daylight
/// saving time.
display: func(this: timezone, when: datetime) -> timezone-display
display: func(when: datetime) -> timezone-display;

/// The same as `display`, but only return the UTC offset.
utc-offset: func(this: timezone, when: datetime) -> s32

/// Dispose of the specified input-stream, after which it may no longer
/// be used.
drop-timezone: func(this: timezone)
utc-offset: func(when: datetime) -> s32;

/// Information useful for displaying the timezone of a specific `datetime`.
///
Expand Down
4 changes: 2 additions & 2 deletions wit/deps/clocks/wall-clock.wit
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ interface wall-clock {
///
/// [POSIX's Seconds Since the Epoch]: https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap04.html#tag_21_04_16
/// [Unix Time]: https://en.wikipedia.org/wiki/Unix_time
now: func() -> datetime
now: func() -> datetime;

/// Query the resolution of the clock.
///
/// The nanoseconds field of the output is always less than 1000000000.
resolution: func() -> datetime
resolution: func() -> datetime;
}
10 changes: 5 additions & 5 deletions wit/deps/clocks/world.wit
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package wasi:clocks
package wasi:clocks;

world example-world {
import monotonic-clock
import wall-clock
import timezone
world imports {
import monotonic-clock;
import wall-clock;
import timezone;
}
4 changes: 2 additions & 2 deletions wit/deps/filesystem/preopens.wit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interface preopens {
use types.{descriptor}
use types.{descriptor};

/// Return the set of preopened directories, and their path.
get-directories: func() -> list<tuple<descriptor, string>>
get-directories: func() -> list<tuple<descriptor, string>>;
}
Loading
Loading