crates/wit-component/tests/components/adapt-preview1/adapt-wasi-snapshot-preview1.wat
raw| 1 | ;; this is a polyfill module that translates from wasi-preview1 to a different |
| 2 | ;; interface |
| 3 | |
| 4 | (module |
| 5 | (import "foo:foo/my-wasi" "proc-exit" (func $proc_exit (param i32))) |
| 6 | (func (export "proc_exit") (param i32) |
| 7 | local.get 0 |
| 8 | call $proc_exit |
| 9 | ) |
| 10 | (func (export "random_get") (param i32 i32) (result i32) |
| 11 | i32.const 0) |
| 12 | (func (export "something_else")) |
| 13 | ) |