| 1 | module builtin |
| 2 | |
| 3 | pub struct CIOVec { |
| 4 | pub: |
| 5 | buf &u8 |
| 6 | len usize |
| 7 | } |
| 8 | |
| 9 | type Errno = u16 |
| 10 | type FileDesc = int |
| 11 | |
| 12 | @[wasm_import_namespace: 'wasi_snapshot_preview1'] |
| 13 | fn WASM.args_sizes_get(argc &u32, argc_buf_size &u32) Errno |
| 14 | |
| 15 | @[wasm_import_namespace: 'wasi_snapshot_preview1'] |
| 16 | fn WASM.args_get(argv &&u8, argv_buf &u8) Errno |
| 17 | |
| 18 | @[wasm_import_namespace: 'wasi_snapshot_preview1'] |
| 19 | fn WASM.fd_write(fd FileDesc, iovs &CIOVec, iovs_len usize, retptr &usize) Errno |
| 20 | |
| 21 | @[wasm_import_namespace: 'wasi_snapshot_preview1'] |
| 22 | fn WASM.fd_read(fd FileDesc, iovs &CIOVec, iovs_len usize, nread &usize) Errno |
| 23 | |
| 24 | @[wasm_import_namespace: 'wasi_snapshot_preview1'] |
| 25 | fn WASM.fd_sync(fd FileDesc) Errno |
| 26 | |
| 27 | @[wasm_import_namespace: 'wasi_snapshot_preview1'] |
| 28 | fn WASM.random_get(buf &u8, buf_len usize) Errno |
| 29 | |
| 30 | @[wasm_import_namespace: 'wasi_snapshot_preview1'] |
| 31 | @[noreturn] |
| 32 | fn WASM.proc_exit(rval int) |
| 33 | |