wa-lang.org/wazero@v1.0.2/internal/integration_test/fs/testdata/fs.wat (about) 1 (module $wasi_fs_exports 2 (type $type_path_open (func (param $fd i32) (param $dirflags i32) (param $path i32) (param $path_len i32) (param $oflags i32) (param $fs_rights_base i64) (param $fs_rights_inheriting i64) (param $fdflags i32) (param $result.opened_fd i32) (result (;errno;) i32))) 3 (type $type_fd_close (func (param $fd i32) (result (;errno;) i32))) 4 (type $type_fd_read (func (param $fd i32) (param $iovs i32) (param $iovs_len i32) (param $result.size i32) (result (;errno;) i32))) 5 (type $type_fd_seek (func (param $fd i32) (param $offset i64) (param $whence i32) (param $result.newoffset i32) (result (;errno;) i32))) 6 7 (import "wasi_snapshot_preview1" "path_open" (func $path_open (type $type_path_open))) 8 (import "wasi_snapshot_preview1" "fd_close" (func $fd_close (type $type_fd_close))) 9 (import "wasi_snapshot_preview1" "fd_read" (func $fd_read (type $type_fd_read))) 10 (import "wasi_snapshot_preview1" "fd_seek" (func $fd_seek (type $type_fd_seek))) 11 12 (func (export "path_open") (type $type_path_open) 13 local.get 0 local.get 1 local.get 2 local.get 3 local.get 4 local.get 5 local.get 6 local.get 7 local.get 8 14 call $path_open 15 ) 16 (func (export "fd_close") (type $type_fd_close) 17 local.get 0 18 call $fd_close 19 ) 20 (func (export "fd_read") (type $type_fd_read) 21 local.get 0 local.get 1 local.get 2 local.get 3 22 call $fd_read 23 ) 24 (func (export "fd_seek") (type $type_fd_seek) 25 local.get 0 local.get 1 local.get 2 local.get 3 26 call $fd_seek 27 ) 28 29 (memory (export "memory") 1 1) ;; memory is required for WASI 30 )