87 lines
2.9 KiB
Plaintext
87 lines
2.9 KiB
Plaintext
(component
|
|
(core module $main (;0;)
|
|
(type (;0;) (func (result i32)))
|
|
(type (;1;) (func))
|
|
(import "old" "nargs" (func (;0;) (type 0)))
|
|
(export "the_entrypoint" (func 1))
|
|
(func (;1;) (type 1))
|
|
(@producers
|
|
(processed-by "wit-component" "$CARGO_PKG_VERSION")
|
|
(processed-by "my-fake-bindgen" "123.45")
|
|
)
|
|
)
|
|
(core module $wit-component:adapter:old (;1;)
|
|
(type (;0;) (func))
|
|
(type (;1;) (func (param i32)))
|
|
(type (;2;) (func (result i32)))
|
|
(import "__main_module__" "the_entrypoint" (func $entry (;0;) (type 0)))
|
|
(global $nargs (;0;) (mut i32) i32.const 0)
|
|
(export "entrypoint" (func 1))
|
|
(export "nargs" (func 2))
|
|
(func (;1;) (type 1) (param i32)
|
|
local.get 0
|
|
global.set $nargs
|
|
call $entry
|
|
)
|
|
(func (;2;) (type 2) (result i32)
|
|
global.get $nargs
|
|
)
|
|
)
|
|
(core module $wit-component-shim-module (;2;)
|
|
(type (;0;) (func (result i32)))
|
|
(table (;0;) 1 1 funcref)
|
|
(export "0" (func $adapt-old-nargs))
|
|
(export "$imports" (table 0))
|
|
(func $adapt-old-nargs (;0;) (type 0) (result i32)
|
|
i32.const 0
|
|
call_indirect (type 0)
|
|
)
|
|
(@producers
|
|
(processed-by "wit-component" "$CARGO_PKG_VERSION")
|
|
)
|
|
)
|
|
(core module $wit-component-fixup (;3;)
|
|
(type (;0;) (func (result 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 $adapt-old-nargs (;0;)))
|
|
(core instance $old (;1;)
|
|
(export "nargs" (func $adapt-old-nargs))
|
|
)
|
|
(core instance $main (;2;) (instantiate $main
|
|
(with "old" (instance $old))
|
|
)
|
|
)
|
|
(alias core export $main "the_entrypoint" (core func $the_entrypoint (;1;)))
|
|
(core instance $__main_module__ (;3;)
|
|
(export "the_entrypoint" (func $the_entrypoint))
|
|
)
|
|
(core instance $"#core-instance4 old" (@name "old") (;4;) (instantiate $wit-component:adapter:old
|
|
(with "__main_module__" (instance $__main_module__))
|
|
)
|
|
)
|
|
(alias core export $wit-component-shim-instance "$imports" (core table $"shim table" (;0;)))
|
|
(alias core export $"#core-instance4 old" "nargs" (core func $nargs (;2;)))
|
|
(core instance $fixup-args (;5;)
|
|
(export "$imports" (table $"shim table"))
|
|
(export "0" (func $nargs))
|
|
)
|
|
(core instance $fixup (;6;) (instantiate $wit-component-fixup
|
|
(with "" (instance $fixup-args))
|
|
)
|
|
)
|
|
(type (;0;) (func (param "nargs" u32)))
|
|
(alias core export $"#core-instance4 old" "entrypoint" (core func $entrypoint (;3;)))
|
|
(func $entrypoint (;0;) (type 0) (canon lift (core func $entrypoint)))
|
|
(export $"#func1 entrypoint" (@name "entrypoint") (;1;) "entrypoint" (func $entrypoint))
|
|
(@producers
|
|
(processed-by "wit-component" "$CARGO_PKG_VERSION")
|
|
)
|
|
)
|