(component
(type (;0;) (func (param "x" u32) (result u32)))
(import "no-options" (func $no-options (;0;) (type 0)))
(type (;1;) (func (param "x" string)))
(import "takes-string" (func $takes-string (;1;) (type 1)))
(type (;2;) (func (result string)))
(import "returns-string" (func $returns-string (;2;) (type 2)))
(core module $main (;0;)
(type (;0;) (func (param i32) (result i32)))
(type (;1;) (func (param i32 i32)))
(type (;2;) (func (param i32)))
(type (;3;) (func))
(type (;4;) (func (param i32 i32 i32 i32) (result i32)))
(import "env" "memory" (memory (;0;) 1))
(import "$root" "no-options" (func (;0;) (type 0)))
(import "$root" "takes-string" (func (;1;) (type 1)))
(import "$root" "returns-string" (func (;2;) (type 2)))
(export "run" (func 3))
(export "cabi_realloc" (func 4))
(func (;3;) (type 3))
(func (;4;) (type 4) (param i32 i32 i32 i32) (result i32)
unreachable
)
(@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 i32 i32) (result i32)))
(table (;0;) 1 1 funcref)
(memory (;0;) 1)
(export "0" (func $realloc-main-cabi_realloc))
(export "$imports" (table 0))
(export "$memory" (memory 0))
(func $realloc-main-cabi_realloc (;0;) (type 0) (param i32 i32 i32 i32) (result i32)
local.get 0
local.get 1
local.get 2
local.get 3
i32.const 0
call_indirect (type 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 "$memory" (core memory $memory (;0;)))
(core instance $env (;1;)
(export "memory" (memory $memory))
)
(core func $no-options (;0;) (canon lower (func $no-options)))
(core func $takes-string (;1;) (canon lower (func $takes-string) (memory $memory) string-encoding=utf8))
(alias core export $wit-component-shim-instance "0" (core func $realloc-main-cabi_realloc (;2;)))
(core func $returns-string (;3;) (canon lower (func $returns-string) (memory $memory) (realloc $realloc-main-cabi_realloc) string-encoding=utf8))
(core instance $$root (;2;)
(export "no-options" (func $no-options))
(export "takes-string" (func $takes-string))
(export "returns-string" (func $returns-string))
)
(core instance $main (;3;) (instantiate $main
(with "env" (instance $env))
(with "$root" (instance $$root))
)
)
(core module $wit-component-fixup (;2;)
(type (;0;) (func (param i32 i32 i32 i32) (result i32)))
(import "actual" "0" (func $0 (;0;) (type 0)))
(import "shim" "$imports" (table (;0;) 1 1 funcref))
(elem (;0;) (i32.const 0) func $0)
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)
(alias core export $main "cabi_realloc" (core func $cabi_realloc (;4;)))
(core instance $actual (;4;)
(export "0" (func $cabi_realloc))
)
(core instance $fixup (;5;) (instantiate $wit-component-fixup
(with "actual" (instance $actual))
(with "shim" (instance $wit-component-shim-instance))
)
)
(type (;3;) (func))
(alias core export $main "run" (core func $run (;5;)))
(func $run (;3;) (type 3) (canon lift (core func $run)))
(export $"#func4 run" (@name "run") (;4;) "run" (func $run))
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)