hello
This commit is contained in:
@@ -3,8 +3,10 @@ package root:component;
|
||||
world root {
|
||||
import wasi:cli/stdin@0.2.6;
|
||||
import wasi:cli/stdout@0.2.6;
|
||||
import wasi:io/streams@0.2.6;
|
||||
|
||||
export wasi:cli/run@0.2.0;
|
||||
// export wasi:cli/run@0.2.0;
|
||||
export hello: func();
|
||||
}
|
||||
|
||||
package wasi:cli@0.2.6 {
|
||||
@@ -13,10 +15,39 @@ package wasi:cli@0.2.6 {
|
||||
|
||||
get-stdout: func() -> output-stream;
|
||||
}
|
||||
}
|
||||
|
||||
package wasi:cli@0.2.0 {
|
||||
interface run {
|
||||
run: func() -> result;
|
||||
interface stdin {
|
||||
}
|
||||
}
|
||||
|
||||
// package wasi:cli@0.2.0 {
|
||||
// interface run {
|
||||
// run: func() -> result;
|
||||
// }
|
||||
// }
|
||||
|
||||
package wasi:io@0.2.6 {
|
||||
interface poll {
|
||||
resource pollable {
|
||||
block: func();
|
||||
}
|
||||
}
|
||||
interface error {
|
||||
resource error;
|
||||
}
|
||||
interface streams {
|
||||
use error.{error};
|
||||
use poll.{pollable};
|
||||
|
||||
resource input-stream;
|
||||
|
||||
resource output-stream {
|
||||
write: func(contents: list<u8>) -> result<_, stream-error>;
|
||||
blocking-write-and-flush: func(contents: list<u8>) ->result<_,stream-error>;
|
||||
}
|
||||
|
||||
variant stream-error {
|
||||
last-operation-failed(error),
|
||||
closed,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user