mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-08 20:56:13 +00:00

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.
6 lines
108 B
Plaintext
6 lines
108 B
Plaintext
(module
|
|
(func (export "add") (param i32 i32) (result i32)
|
|
(i32.add (local.get 0) (local.get 1))
|
|
)
|
|
)
|