-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* rename `preview2/` to `wasip2/` * Update to v0.2.1
- Loading branch information
1 parent
3561990
commit 74a1d20
Showing
41 changed files
with
564 additions
and
147 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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,10 @@ | ||
package wasi:cli@0.2.1; | ||
|
||
@since(version = 0.2.0) | ||
world command { | ||
@since(version = 0.2.0) | ||
include imports; | ||
|
||
@since(version = 0.2.0) | ||
export run; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@since(version = 0.2.0) | ||
interface exit { | ||
/// Exit the current instance and any linked instances. | ||
@since(version = 0.2.0) | ||
exit: func(status: result); | ||
|
||
/// Exit the current instance and any linked instances, reporting the | ||
/// specified status code to the host. | ||
/// | ||
/// The meaning of the code depends on the context, with 0 usually meaning | ||
/// "success", and other values indicating various types of failure. | ||
/// | ||
/// This function does not return; the effect is analogous to a trap, but | ||
/// without the connotation that something bad has happened. | ||
@unstable(feature = cli-exit-with-code) | ||
exit-with-code: func(status-code: u8); | ||
} |
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,36 @@ | ||
package wasi:cli@0.2.1; | ||
|
||
@since(version = 0.2.0) | ||
world imports { | ||
@since(version = 0.2.0) | ||
include wasi:clocks/imports@0.2.1; | ||
@since(version = 0.2.0) | ||
include wasi:filesystem/imports@0.2.1; | ||
@since(version = 0.2.0) | ||
include wasi:sockets/imports@0.2.1; | ||
@since(version = 0.2.0) | ||
include wasi:random/imports@0.2.1; | ||
@since(version = 0.2.0) | ||
include wasi:io/imports@0.2.1; | ||
|
||
@since(version = 0.2.0) | ||
import environment; | ||
@since(version = 0.2.0) | ||
import exit; | ||
@since(version = 0.2.0) | ||
import stdin; | ||
@since(version = 0.2.0) | ||
import stdout; | ||
@since(version = 0.2.0) | ||
import stderr; | ||
@since(version = 0.2.0) | ||
import terminal-input; | ||
@since(version = 0.2.0) | ||
import terminal-output; | ||
@since(version = 0.2.0) | ||
import terminal-stdin; | ||
@since(version = 0.2.0) | ||
import terminal-stdout; | ||
@since(version = 0.2.0) | ||
import terminal-stderr; | ||
} |
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,6 @@ | ||
@since(version = 0.2.0) | ||
interface run { | ||
/// Run the program. | ||
@since(version = 0.2.0) | ||
run: func() -> result; | ||
} |
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,26 @@ | ||
@since(version = 0.2.0) | ||
interface stdin { | ||
@since(version = 0.2.0) | ||
use wasi:io/streams@0.2.1.{input-stream}; | ||
|
||
@since(version = 0.2.0) | ||
get-stdin: func() -> input-stream; | ||
} | ||
|
||
@since(version = 0.2.0) | ||
interface stdout { | ||
@since(version = 0.2.0) | ||
use wasi:io/streams@0.2.1.{output-stream}; | ||
|
||
@since(version = 0.2.0) | ||
get-stdout: func() -> output-stream; | ||
} | ||
|
||
@since(version = 0.2.0) | ||
interface stderr { | ||
@since(version = 0.2.0) | ||
use wasi:io/streams@0.2.1.{output-stream}; | ||
|
||
@since(version = 0.2.0) | ||
get-stderr: func() -> output-stream; | ||
} |
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 |
---|---|---|
@@ -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, | ||
} | ||
} |
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
Oops, something went wrong.