Skip to content

Commit

Permalink
Merge branch 'main' into exit-with-code
Browse files Browse the repository at this point in the history
  • Loading branch information
ricochet authored Aug 1, 2024
2 parents af5d03c + 6d41983 commit 39d5944
Show file tree
Hide file tree
Showing 34 changed files with 1,704 additions and 1,409 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
./wit-deps lock
git add -N wit/deps
git diff --exit-code
- uses: WebAssembly/wit-abi-up-to-date@v17
- uses: WebAssembly/wit-abi-up-to-date@v21
with:
wit-bindgen: '0.16.0'
wit-bindgen: '0.28.0'
worlds: 'command imports'
features: 'exit-with-code'
features: 'exit-with-code'
1,361 changes: 680 additions & 681 deletions command.md

Large diffs are not rendered by default.

1,361 changes: 680 additions & 681 deletions imports.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions wit/command.wit
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package wasi:cli@0.2.0;

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

@since(version = 0.2.0)
export run;
}
20 changes: 10 additions & 10 deletions wit/deps.lock
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
[clocks]
url = "https://github.com/WebAssembly/wasi-clocks/archive/main.tar.gz"
sha256 = "468b4d12892fe926b8eb5d398dbf579d566c93231fa44f415440572c695b7613"
sha512 = "e6b53a07221f1413953c9797c68f08b815fdaebf66419bbc1ea3e8b7dece73731062693634731f311a03957b268cf9cc509c518bd15e513c318aa04a8459b93a"
sha256 = "f27a857de70c1b0dfbabda35812a8de1253089623b1a84ddd066183c6ffac5f8"
sha512 = "9df1b0be1e4925f671fda65d433217798404f8e2e4fa60ff8bfdfd257f0b6d212ea350c141f308cf4cc57fb0b44899b14af1f9af97a05dcd6f8ae00a7594de8d"

[filesystem]
url = "https://github.com/WebAssembly/wasi-filesystem/archive/main.tar.gz"
sha256 = "498c465cfd04587db40f970fff2185daa597d074c20b68a8bcbae558f261499b"
sha512 = "ead452f9b7bfb88593a502ec00d76d4228003d51c40fd0408aebc32d35c94673551b00230d730873361567cc209ec218c41fb4e95bad194268592c49e7964347"
sha256 = "e37bda5e27222621771ba07d2e9daf862a728c31f91024badfc4f9a42c9ae8ee"
sha512 = "81e92f5e4eca0c8f9606f26a1c4eebb3c53a708b57d3f7e7c60e97aa3c18794b72a44c39212de566442e25313b5ccb5b0b7c9070f3600f0c7c584ea9db91e207"

[io]
url = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz"
sha256 = "7210e5653539a15478f894d4da24cc69d61924cbcba21d2804d69314a88e5a4c"
sha512 = "49184a1b0945a889abd52d25271172ed3dc2db6968fcdddb1bab7ee0081f4a3eeee0977ad2291126a37631c0d86eeea75d822fa8af224c422134500bf9f0f2bb"
sha256 = "f3e976740ed9512674c627c6588864c477a9ff539bb7e55c7b9ceab222399b52"
sha512 = "c785122b4c04e2297e3fa37ae76c149b0a681444da106758cf673023923b69a6b2c65624ffbb6ad31edef02f9fbc677b05c89525f07b1159fe0c997a8c6b1a8f"

[random]
url = "https://github.com/WebAssembly/wasi-random/archive/main.tar.gz"
sha256 = "7371d03c037d924caba2587fb2e7c5773a0d3c5fcecbf7971e0e0ba57973c53d"
sha512 = "964c4e8925a53078e4d94ba907b54f89a0b7e154f46823a505391471466c17f53c8692682e5c85771712acd88b348686173fc07c53a3cfe3d301b8cd8ddd0de4"
sha256 = "2f0014e946e38947afe120836b17cdcfa608be993d38d55b81cc2d31e7e70b16"
sha512 = "51ee623509040de77b0ba236e29589102538aacd3dd67168b06a09bf6ae469c762818fc07b5039d2a8b1838f4b5a5965a7c81ed0e2d47b142bece9d1ab8b93a6"

[sockets]
url = "https://github.com/WebAssembly/wasi-sockets/archive/main.tar.gz"
sha256 = "622bd28bbeb43736375dc02bd003fd3a016ff8ee91e14bab488325c6b38bf966"
sha512 = "5a63c1f36de0c4548e1d2297bdbededb28721cbad94ef7825c469eae29d7451c97e00b4c1d6730ee1ec0c4a5aac922961a2795762d4a0c3bb54e30a391a84bae"
sha256 = "5321ba37115d503bfe0880349e99ecbd26ee812708fa83d2b276ec8ee7571443"
sha512 = "c3d71c2afa1475bf10d86b1e0623e2292e5dd407cf54103ad0d05c07fa95323bff9ad06e929d508b318a0a99a67132793fb9a04c17585843e24f090f5ee91367"
17 changes: 11 additions & 6 deletions wit/deps/clocks/monotonic-clock.wit
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,43 @@ package wasi:clocks@0.2.0;
///
/// A monotonic clock is a clock which has an unspecified initial value, and
/// successive reads of the clock will produce non-decreasing values.
///
/// It is intended for measuring elapsed time.
@since(version = 0.2.0)
interface monotonic-clock {
@since(version = 0.2.0)
use wasi:io/poll@0.2.0.{pollable};

/// An instant in time, in nanoseconds. An instant is relative to an
/// unspecified initial value, and can only be compared to instances from
/// the same monotonic-clock.
@since(version = 0.2.0)
type instant = u64;

/// A duration of time, in nanoseconds.
@since(version = 0.2.0)
type duration = 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.
@since(version = 0.2.0)
now: func() -> instant;

/// Query the resolution of the clock. Returns the duration of time
/// corresponding to a clock tick.
@since(version = 0.2.0)
resolution: func() -> duration;

/// Create a `pollable` which will resolve once the specified instant
/// occured.
/// has occured.
@since(version = 0.2.0)
subscribe-instant: func(
when: instant,
) -> pollable;

/// Create a `pollable` which will resolve once the given duration has
/// elapsed, starting at the time at which this function was called.
/// occured.
/// Create a `pollable` that will resolve after the specified duration has
/// elapsed from the time this function is invoked.
@since(version = 0.2.0)
subscribe-duration: func(
when: duration,
) -> pollable;
Expand Down
55 changes: 55 additions & 0 deletions wit/deps/clocks/timezone.wit
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package wasi:clocks@0.2.0;

@unstable(feature = clocks-timezone)
interface timezone {
@unstable(feature = clocks-timezone)
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
/// daylight saving time is active.
///
/// 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.
@unstable(feature = clocks-timezone)
display: func(when: datetime) -> timezone-display;

/// The same as `display`, but only return the UTC offset.
@unstable(feature = clocks-timezone)
utc-offset: func(when: datetime) -> s32;

/// Information useful for displaying the timezone of a specific `datetime`.
///
/// This information may vary within a single `timezone` to reflect daylight
/// saving time adjustments.
@unstable(feature = clocks-timezone)
record timezone-display {
/// The number of seconds difference between UTC time and the local
/// time of the timezone.
///
/// The returned value will always be less than 86400 which is the
/// number of seconds in a day (24*60*60).
///
/// In implementations that do not expose an actual time zone, this
/// should return 0.
utc-offset: s32,

/// The abbreviated name of the timezone to display to a user. The name
/// `UTC` indicates Coordinated Universal Time. Otherwise, this should
/// reference local standards for the name of the time zone.
///
/// In implementations that do not expose an actual time zone, this
/// should be the string `UTC`.
///
/// In time zones that do not have an applicable name, a formatted
/// representation of the UTC offset may be returned, such as `-04:00`.
name: string,

/// Whether daylight saving time is active.
///
/// In implementations that do not expose an actual time zone, this
/// should return false.
in-daylight-saving-time: bool,
}
}
4 changes: 4 additions & 0 deletions wit/deps/clocks/wall-clock.wit
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ package wasi:clocks@0.2.0;
/// monotonic, making it unsuitable for measuring elapsed time.
///
/// It is intended for reporting the current date and time for humans.
@since(version = 0.2.0)
interface wall-clock {
/// A time and date in seconds plus nanoseconds.
@since(version = 0.2.0)
record datetime {
seconds: u64,
nanoseconds: u32,
Expand All @@ -33,10 +35,12 @@ 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
@since(version = 0.2.0)
now: func() -> datetime;

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

@since(version = 0.2.0)
world imports {
@since(version = 0.2.0)
import monotonic-clock;
@since(version = 0.2.0)
import wall-clock;
@unstable(feature = clocks-timezone)
import timezone;
}
3 changes: 3 additions & 0 deletions wit/deps/filesystem/preopens.wit
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package wasi:filesystem@0.2.0;

@since(version = 0.2.0)
interface preopens {
@since(version = 0.2.0)
use types.{descriptor};

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

0 comments on commit 39d5944

Please sign in to comment.