Add *.wast support for invoking components (#4526)
This commit builds on bytecodealliance/wasm-tools#690 to add support to testing of the component model to execute functions when running `*.wast` files. This support is all built on #4442 as functions are invoked through a "dynamic" API. Right now the testing and integration is fairly crude but I'm hoping that we can try to improve it over time as necessary. For now this should provide a hopefully more convenient syntax for unit tests and the like.
This commit is contained in:
@@ -32,3 +32,11 @@
|
||||
(component (export ""))
|
||||
)
|
||||
"exporting a component from the root component is not supported")
|
||||
|
||||
(component
|
||||
(core module $m (func (export "")))
|
||||
(core instance $m (instantiate $m))
|
||||
(func (export "") (canon lift (core func $m "")))
|
||||
)
|
||||
|
||||
(assert_return (invoke "") (unit.const))
|
||||
|
||||
Reference in New Issue
Block a user