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