| 1 |
wasip2::cli::command::export!(Example); |
| 2 |
|
| 3 |
struct Example; |
| 4 |
|
| 5 |
impl wasip2::exports::cli::run::Guest for Example { |
| 6 |
fn run() -> Result<(), ()> { |
| 7 |
let stdout = wasip2::cli::stdout::get_stdout(); |
| 8 |
stdout.blocking_write_and_flush(b"Hello, WASI!").unwrap(); |
| 9 |
Ok(()) |
| 10 |
} |
| 11 |
} |