Files
wasmtime/test.witx
2020-01-28 18:17:48 -08:00

51 lines
1.2 KiB
Plaintext

(typename $errno
(enum u32
$ok
$invalid_arg
$dont_want_to
$physically_unable
$picket_line))
(typename $excuse
(enum u8
$dog_ate
$traffic
$sleeping))
(typename $pair_ints
(struct
(field $first s32)
(field $second s32)))
(typename $pair_int_ptrs
(struct
(field $first (@witx const_pointer s32))
(field $second (@witx const_pointer s32))))
(module $foo
(@interface func (export "bar")
(param $an_int u32)
(param $an_float f32)
(result $error $errno))
(@interface func (export "baz")
(param $an_excuse $excuse)
(param $an_excuse_by_reference (@witx pointer $excuse))
(param $a_lamer_excuse (@witx const_pointer $excuse))
(param $two_layers_of_excuses (@witx pointer (@witx const_pointer $excuse)))
(result $error $errno))
(@interface func (export "bat")
(param $an_int u32)
(result $error $errno)
(result $doubled_it f32))
(@interface func (export "sum_of_pair")
(param $an_pair $pair_ints)
(result $error $errno)
(result $doubled s64))
(@interface func (export "sum_of_pair_of_ptrs")
(param $an_pair $pair_int_ptrs)
(result $error $errno)
(result $doubled s64))
)