(component
(type (;0;) (func (result string)))
(import "returns-string" (func $returns-string (;0;) (type 0)))
(type (;1;) (list u32))
(type (;2;) (func (result 1)))
(import "returns-list" (func $returns-list (;1;) (type 2)))
(type (;3;) (func (param "a" u32) (result string)))
(import "returns-string2" (func $returns-string2 (;2;) (type 3)))
(type (;4;) (func (param "s" string)))
(import "takes-string" (func $takes-string (;3;) (type 4)))
(type (;5;) (func (param "a" u32) (result u32)))
(import "no-options" (func $no-options (;4;) (type 5)))
(core module $main (;0;)
(type (;0;) (func (param i32)))
(type (;1;) (func (param i32 i32)))
(type (;2;) (func (param i32) (result i32)))
(type (;3;) (func (param i32 i32) (result i32)))
(type (;4;) (func))
(type (;5;) (func (param i32 i32 i32 i32) (result i32)))
(import "env" "memory" (memory (;0;) 1))
(import "$root" "returns-string" (func (;0;) (type 0)))
(import "$root" "returns-list" (func (;1;) (type 0)))
(import "$root" "returns-string2" (func (;2;) (type 1)))
(import "$root" "takes-string" (func (;3;) (type 1)))
(import "$root" "no-options" (func (;4;) (type 2)))
(export "takes-and-returns" (func 5))
(export "run" (func 6))
(export "cabi_realloc" (func 7))
(func (;5;) (type 3) (param i32 i32) (result i32)
unreachable
)
(func (;6;) (type 4))
(func (;7;) (type 5) (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))
)
(alias core export $wit-component-shim-instance "0" (core func $realloc-main-cabi_realloc (;0;)))
(core func $returns-string (;1;) (canon lower (func $returns-string) (memory $memory) (realloc $realloc-main-cabi_realloc) string-encoding=utf8))
(core func $returns-list (;2;) (canon lower (func $returns-list) (memory $memory) (realloc $realloc-main-cabi_realloc)))
(core func $returns-string2 (;3;) (canon lower (func $returns-string2) (memory $memory) (realloc $realloc-main-cabi_realloc) string-encoding=utf8))
(core func $takes-string (;4;) (canon lower (func $takes-string) (memory $memory) string-encoding=utf8))
(core func $no-options (;5;) (canon lower (func $no-options)))
(core instance $$root (;2;)
(export "returns-string" (func $returns-string))
(export "returns-list" (func $returns-list))
(export "returns-string2" (func $returns-string2))
(export "takes-string" (func $takes-string))
(export "no-options" (func $no-options))
)
(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 (;6;)))
(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 (;6;) (func (param "s" string) (result string)))
(alias core export $main "takes-and-returns" (core func $takes-and-returns (;7;)))
(func $takes-and-returns (;5;) (type 6) (canon lift (core func $takes-and-returns) (memory $memory) (realloc $cabi_realloc) string-encoding=utf8))
(export $"#func6 takes-and-returns" (@name "takes-and-returns") (;6;) "takes-and-returns" (func $takes-and-returns))
(type (;7;) (func))
(alias core export $main "run" (core func $run (;8;)))
(func $run (;7;) (type 7) (canon lift (core func $run)))
(export $"#func8 run" (@name "run") (;8;) "run" (func $run))
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)