| 1 |
(component |
| 2 |
(type (;0;) |
| 3 |
(instance |
| 4 |
(type (;0;) (list u8)) |
| 5 |
(type (;1;) (func (param "amt" u32) (result 0))) |
| 6 |
(export (;0;) "read" (func (type 1))) |
| 7 |
) |
| 8 |
) |
| 9 |
(import "new" (instance (;0;) (type 0))) |
| 10 |
(core module (;0;) |
| 11 |
(type (;0;) (func (param i32 i32))) |
| 12 |
(import "old" "read" (func (;0;) (type 0))) |
| 13 |
(memory (;0;) 1) |
| 14 |
(export "main" (func 1)) |
| 15 |
(export "memory" (memory 0)) |
| 16 |
(func (;1;) (type 0) (param $args i32) (param $argv i32)) |
| 17 |
(@producers |
| 18 |
(processed-by "wit-component" "$CARGO_PKG_VERSION") |
| 19 |
(processed-by "my-fake-bindgen" "123.45") |
| 20 |
) |
| 21 |
) |
| 22 |
(core module (;1;) |
| 23 |
(type (;0;) (func (param i32 i32))) |
| 24 |
(type (;1;) (func (param i32 i32 i32 i32) (result i32))) |
| 25 |
(import "new" "read" (func $read (;0;) (type 0))) |
| 26 |
(global $sp (;0;) (mut i32) i32.const 0) |
| 27 |
(export "entrypoint" (func 1)) |
| 28 |
(export "cabi_export_realloc" (func 2)) |
| 29 |
(export "read" (func 3)) |
| 30 |
(export "cabi_import_realloc" (func 4)) |
| 31 |
(func (;1;) (type 0) (param i32 i32) |
| 32 |
unreachable |
| 33 |
) |
| 34 |
(func (;2;) (type 1) (param i32 i32 i32 i32) (result i32) |
| 35 |
unreachable |
| 36 |
) |
| 37 |
(func (;3;) (type 0) (param i32 i32) |
| 38 |
(local i32) |
| 39 |
global.get $sp |
| 40 |
i32.const 8 |
| 41 |
i32.sub |
| 42 |
local.tee 2 |
| 43 |
global.set $sp |
| 44 |
local.get 1 |
| 45 |
local.get 2 |
| 46 |
call $read |
| 47 |
local.get 2 |
| 48 |
i32.const 8 |
| 49 |
i32.add |
| 50 |
global.set $sp |
| 51 |
) |
| 52 |
(func (;4;) (type 1) (param i32 i32 i32 i32) (result i32) |
| 53 |
unreachable |
| 54 |
) |
| 55 |
) |
| 56 |
(core module (;2;) |
| 57 |
(type (;0;) (func (param i32 i32))) |
| 58 |
(type (;1;) (func (param i32 i32))) |
| 59 |
(table (;0;) 2 2 funcref) |
| 60 |
(export "0" (func $adapt-old-read)) |
| 61 |
(export "1" (func $indirect-new-read)) |
| 62 |
(export "$imports" (table 0)) |
| 63 |
(func $adapt-old-read (;0;) (type 0) (param i32 i32) |
| 64 |
local.get 0 |
| 65 |
local.get 1 |
| 66 |
i32.const 0 |
| 67 |
call_indirect (type 0) |
| 68 |
) |
| 69 |
(func $indirect-new-read (;1;) (type 1) (param i32 i32) |
| 70 |
local.get 0 |
| 71 |
local.get 1 |
| 72 |
i32.const 1 |
| 73 |
call_indirect (type 1) |
| 74 |
) |
| 75 |
(@producers |
| 76 |
(processed-by "wit-component" "$CARGO_PKG_VERSION") |
| 77 |
) |
| 78 |
) |
| 79 |
(core module (;3;) |
| 80 |
(type (;0;) (func (param i32 i32))) |
| 81 |
(type (;1;) (func (param i32 i32))) |
| 82 |
(import "" "0" (func (;0;) (type 0))) |
| 83 |
(import "" "1" (func (;1;) (type 1))) |
| 84 |
(import "" "$imports" (table (;0;) 2 2 funcref)) |
| 85 |
(elem (;0;) (i32.const 0) func 0 1) |
| 86 |
(@producers |
| 87 |
(processed-by "wit-component" "$CARGO_PKG_VERSION") |
| 88 |
) |
| 89 |
) |
| 90 |
(core instance (;0;) (instantiate 2)) |
| 91 |
(alias core export 0 "0" (core func (;0;))) |
| 92 |
(core instance (;1;) |
| 93 |
(export "read" (func 0)) |
| 94 |
) |
| 95 |
(core instance (;2;) (instantiate 0 |
| 96 |
(with "old" (instance 1)) |
| 97 |
) |
| 98 |
) |
| 99 |
(alias core export 2 "memory" (core memory (;0;))) |
| 100 |
(alias core export 0 "1" (core func (;1;))) |
| 101 |
(core instance (;3;) |
| 102 |
(export "read" (func 1)) |
| 103 |
) |
| 104 |
(core instance (;4;) (instantiate 1 |
| 105 |
(with "new" (instance 3)) |
| 106 |
) |
| 107 |
) |
| 108 |
(alias core export 0 "$imports" (core table (;0;))) |
| 109 |
(alias core export 4 "read" (core func (;2;))) |
| 110 |
(alias export 0 "read" (func (;0;))) |
| 111 |
(alias core export 4 "cabi_import_realloc" (core func (;3;))) |
| 112 |
(core func (;4;) (canon lower (func 0) (memory 0) (realloc 3))) |
| 113 |
(core instance (;5;) |
| 114 |
(export "$imports" (table 0)) |
| 115 |
(export "0" (func 2)) |
| 116 |
(export "1" (func 4)) |
| 117 |
) |
| 118 |
(core instance (;6;) (instantiate 3 |
| 119 |
(with "" (instance 5)) |
| 120 |
) |
| 121 |
) |
| 122 |
(type (;1;) (list string)) |
| 123 |
(type (;2;) (func (param "args" 1))) |
| 124 |
(alias core export 4 "entrypoint" (core func (;5;))) |
| 125 |
(alias core export 4 "cabi_export_realloc" (core func (;6;))) |
| 126 |
(func (;1;) (type 2) (canon lift (core func 5) (memory 0) (realloc 6) string-encoding=utf8)) |
| 127 |
(export (;2;) "entrypoint" (func 1)) |
| 128 |
(@producers |
| 129 |
(processed-by "wit-component" "$CARGO_PKG_VERSION") |
| 130 |
) |
| 131 |
) |