Add wasi:cli component support, linear memory and globals
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cb1cec8b13
commit
05488c9783
11 files changed
+518
-52
No files matched your search
@@ -0,0 +1,26 @@
|
||||
package wasi:cli@0.2.0;
|
||||
|
||||
interface stdout {
|
||||
use wasi:io/streams@0.2.0.{output-stream};
|
||||
get-stdout: func() -> output-stream;
|
||||
}
|
||||
|
||||
interface stderr {
|
||||
use wasi:io/streams@0.2.0.{output-stream};
|
||||
get-stderr: func() -> output-stream;
|
||||
}
|
||||
|
||||
interface exit {
|
||||
exit: func(status: result);
|
||||
}
|
||||
|
||||
interface run {
|
||||
run: func() -> result;
|
||||
}
|
||||
|
||||
world command {
|
||||
import stdout;
|
||||
import stderr;
|
||||
import exit;
|
||||
export run;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package wasi:io@0.2.0;
|
||||
|
||||
interface error {
|
||||
resource error {}
|
||||
}
|
||||
|
||||
interface streams {
|
||||
use error.{error};
|
||||
|
||||
variant stream-error {
|
||||
last-operation-failed(error),
|
||||
closed,
|
||||
}
|
||||
|
||||
resource output-stream {
|
||||
blocking-write-and-flush: func(contents: list<u8>) -> result<_, stream-error>;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user