-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
837 additions
and
838 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,22 +1,22 @@ | ||
@since(version = 0.2.0) | ||
interface environment { | ||
/// Get the POSIX-style environment variables. | ||
/// | ||
/// Each environment variable is provided as a pair of string variable names | ||
/// and string value. | ||
/// | ||
/// 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) | ||
get-environment: func() -> list<tuple<string, string>>; | ||
/// Get the POSIX-style environment variables. | ||
/// | ||
/// Each environment variable is provided as a pair of string variable names | ||
/// and string value. | ||
/// | ||
/// 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) | ||
get-environment: func() -> list<tuple<string, string>>; | ||
|
||
/// Get the POSIX-style arguments to the program. | ||
@since(version = 0.2.0) | ||
get-arguments: func() -> list<string>; | ||
/// Get the POSIX-style arguments to the program. | ||
@since(version = 0.2.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) | ||
initial-cwd: func() -> option<string>; | ||
/// Return a path that programs should use as their initial current working | ||
/// directory, interpreting `.` as shorthand for this. | ||
@since(version = 0.2.0) | ||
initial-cwd: func() -> option<string>; | ||
} |
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,17 +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. | ||
@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); | ||
/// 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
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,6 +1,6 @@ | ||
@since(version = 0.2.0) | ||
interface run { | ||
/// Run the program. | ||
@since(version = 0.2.0) | ||
run: func() -> result; | ||
/// 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 |
---|---|---|
@@ -1,26 +1,26 @@ | ||
@since(version = 0.2.0) | ||
interface stdin { | ||
@since(version = 0.2.0) | ||
use wasi:io/streams@0.2.3.{input-stream}; | ||
@since(version = 0.2.0) | ||
use wasi:io/streams@0.2.3.{input-stream}; | ||
|
||
@since(version = 0.2.0) | ||
get-stdin: func() -> 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.3.{output-stream}; | ||
@since(version = 0.2.0) | ||
use wasi:io/streams@0.2.3.{output-stream}; | ||
|
||
@since(version = 0.2.0) | ||
get-stdout: func() -> 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.3.{output-stream}; | ||
@since(version = 0.2.0) | ||
use wasi:io/streams@0.2.3.{output-stream}; | ||
|
||
@since(version = 0.2.0) | ||
get-stderr: func() -> 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
Oops, something went wrong.