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.
This commit is contained in:
5
samples/wasm-c-api/src/empty_imports.wat
Normal file
5
samples/wasm-c-api/src/empty_imports.wat
Normal file
@ -0,0 +1,5 @@
|
||||
(module
|
||||
(func (export "add") (param i32 i32) (result i32)
|
||||
(i32.add (local.get 0) (local.get 1))
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user