wasm-micro-runtime/samples/wasm-c-api/src/empty_imports.wat
Michael Martin c94e752532
Allow empty import array for wasm-c-api wasm_instance_new (#782)
Allow empty import array (but not NULL) for wasm-c-api wasm_instance_new,
which makes the code more robust, especially in use cases where imports
might be constructed dynamically.
And add a test case in samples/wasm-c-api/src/empty_imports.c to test it.
2021-10-12 16:06:38 +08:00

6 lines
108 B
Plaintext

(module
(func (export "add") (param i32 i32) (result i32)
(i32.add (local.get 0) (local.get 1))
)
)