This commit fixes a panic related to type imports where an import of a type didn't correctly declare the new type index on the Wasmtime side of things. Additionally this plumbs more support throughout Wasmtime to support type imports, namely that they do not need to be supplied through a `Linker`. This additionally implements a feature where empty instances, even transitively, do not need to be supplied by a Wasmtime embedder. This means that instances which only have types, for example, do not need to be supplied into a `Linker` since no runtime information for them is required anyway. Closes #5775
19 lines
462 B
Plaintext
19 lines
462 B
Plaintext
(assert_unlinkable
|
|
(component
|
|
(import "undefined-name" (core module))
|
|
)
|
|
"expected module found nothing")
|
|
(component $i)
|
|
(component
|
|
(import "i" (instance))
|
|
)
|
|
(assert_unlinkable
|
|
(component (import "i" (core module)))
|
|
"expected module found instance")
|
|
(assert_unlinkable
|
|
(component (import "i" (func)))
|
|
"expected func found instance")
|
|
(assert_unlinkable
|
|
(component (import "i" (instance (export "x" (func)))))
|
|
"expected func found nothing")
|