68 lines
2.2 KiB
Plaintext
68 lines
2.2 KiB
Plaintext
|
|
(component
|
||
|
|
(type $ty-foo (;0;)
|
||
|
|
(instance
|
||
|
|
(type (;0;) (func (param "s" string)))
|
||
|
|
(export (;0;) "log" (func (type 0)))
|
||
|
|
)
|
||
|
|
)
|
||
|
|
(import "foo" (instance $foo (;0;) (type $ty-foo)))
|
||
|
|
(core module $main (;0;)
|
||
|
|
(type (;0;) (func (param i32 i32)))
|
||
|
|
(import "foo" "log" (func (;0;) (type 0)))
|
||
|
|
(memory (;0;) 1)
|
||
|
|
(export "memory" (memory 0))
|
||
|
|
(@producers
|
||
|
|
(processed-by "wit-component" "$CARGO_PKG_VERSION")
|
||
|
|
(processed-by "my-fake-bindgen" "123.45")
|
||
|
|
)
|
||
|
|
)
|
||
|
|
(core module $wit-component-shim-module (;1;)
|
||
|
|
(type (;0;) (func (param i32 i32)))
|
||
|
|
(table (;0;) 1 1 funcref)
|
||
|
|
(export "0" (func $indirect-foo-log))
|
||
|
|
(export "$imports" (table 0))
|
||
|
|
(func $indirect-foo-log (;0;) (type 0) (param i32 i32)
|
||
|
|
local.get 0
|
||
|
|
local.get 1
|
||
|
|
i32.const 0
|
||
|
|
call_indirect (type 0)
|
||
|
|
)
|
||
|
|
(@producers
|
||
|
|
(processed-by "wit-component" "$CARGO_PKG_VERSION")
|
||
|
|
)
|
||
|
|
)
|
||
|
|
(core module $wit-component-fixup (;2;)
|
||
|
|
(type (;0;) (func (param i32 i32)))
|
||
|
|
(import "" "0" (func (;0;) (type 0)))
|
||
|
|
(import "" "$imports" (table (;0;) 1 1 funcref))
|
||
|
|
(elem (;0;) (i32.const 0) func 0)
|
||
|
|
(@producers
|
||
|
|
(processed-by "wit-component" "$CARGO_PKG_VERSION")
|
||
|
|
)
|
||
|
|
)
|
||
|
|
(core instance $wit-component-shim-instance (;0;) (instantiate $wit-component-shim-module))
|
||
|
|
(alias core export $wit-component-shim-instance "0" (core func $indirect-foo-log (;0;)))
|
||
|
|
(core instance $foo (;1;)
|
||
|
|
(export "log" (func $indirect-foo-log))
|
||
|
|
)
|
||
|
|
(core instance $main (;2;) (instantiate $main
|
||
|
|
(with "foo" (instance $foo))
|
||
|
|
)
|
||
|
|
)
|
||
|
|
(alias core export $main "memory" (core memory $memory (;0;)))
|
||
|
|
(alias core export $wit-component-shim-instance "$imports" (core table $"shim table" (;0;)))
|
||
|
|
(alias export $foo "log" (func $log (;0;)))
|
||
|
|
(core func $"#core-func1 indirect-foo-log" (@name "indirect-foo-log") (;1;) (canon lower (func $log) (memory $memory) string-encoding=utf8))
|
||
|
|
(core instance $fixup-args (;3;)
|
||
|
|
(export "$imports" (table $"shim table"))
|
||
|
|
(export "0" (func $"#core-func1 indirect-foo-log"))
|
||
|
|
)
|
||
|
|
(core instance $fixup (;4;) (instantiate $wit-component-fixup
|
||
|
|
(with "" (instance $fixup-args))
|
||
|
|
)
|
||
|
|
)
|
||
|
|
(@producers
|
||
|
|
(processed-by "wit-component" "$CARGO_PKG_VERSION")
|
||
|
|
)
|
||
|
|
)
|