wasm-micro-runtime/samples/wasm-c-api/src/table.wat
Wenyong Huang edb184f709
Implement most missing wasm-c-api APIs (#303) (#676)
Remove unnecessary functions and implement more APIs:
- wasm_##name##same
- wasm##name##as_ref
- wasm_ref_as##name##
- wasm_ref_delete
- wasm_module_validate
- wasm_table_get/set/size
- wasm_memory_size
- wasm_config_new
- wasm_foreign_new

And add more wasm-c-api samples, update the related documen, add more CI rules.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-07-28 21:53:37 +08:00

13 lines
345 B
Plaintext

(module
(table (export "table") 2 10 funcref)
(func (export "call_indirect") (param i32 i32) (result i32)
(call_indirect (param i32) (result i32) (local.get 0) (local.get 1))
)
(func $f (export "f") (param i32) (result i32) (local.get 0))
(func (export "g") (param i32) (result i32) (i32.const 666))
(elem (i32.const 1) $f)
)