Debian Codegraph @

crates/wit-component/tests/components/adapt-import-only-used-in-adapter/component.wat

raw
1 (component
2 (type (;0;)
3 (instance
4 (type (;0;) (func (param "x" string)))
5 (export (;0;) "foo" (func (type 0)))
6 )
7 )
8 (import "foo:foo/adapter-imports" (instance (;0;) (type 0)))
9 (type (;1;) (func (param "x" string)))
10 (import "foo" (func (;0;) (type 1)))
11 (core module (;0;)
12 (type (;0;) (func (param i32 i32)))
13 (type (;1;) (func))
14 (import "$root" "foo" (func (;0;) (type 0)))
15 (memory (;0;) 1)
16 (export "bar" (func 1))
17 (export "memory" (memory 0))
18 (func (;1;) (type 1)
19 unreachable
20 )
21 (@producers
22 (processed-by "wit-component" "$CARGO_PKG_VERSION")
23 (processed-by "my-fake-bindgen" "123.45")
24 )
25 )
26 (core module (;1;)
27 (type (;0;) (func (param i32 i32)))
28 (type (;1;) (func (param i32 i32 i32 i32) (result i32)))
29 (import "foo:foo/adapter-imports" "foo" (func $foo (;0;) (type 0)))
30 (export "adapter-bar" (func 1))
31 (export "cabi_export_realloc" (func 2))
32 (func (;1;) (type 0) (param i32 i32)
33 i32.const 0
34 i32.const 0
35 call $foo
36 )
37 (func (;2;) (type 1) (param i32 i32 i32 i32) (result i32)
38 unreachable
39 )
40 )
41 (core module (;2;)
42 (type (;0;) (func (param i32 i32)))
43 (table (;0;) 2 2 funcref)
44 (export "0" (func $indirect-$root-foo))
45 (export "1" (func $indirect-foo:foo/adapter-imports-foo))
46 (export "$imports" (table 0))
47 (func $indirect-$root-foo (;0;) (type 0) (param i32 i32)
48 local.get 0
49 local.get 1
50 i32.const 0
51 call_indirect (type 0)
52 )
53 (func $indirect-foo:foo/adapter-imports-foo (;1;) (type 0) (param i32 i32)
54 local.get 0
55 local.get 1
56 i32.const 1
57 call_indirect (type 0)
58 )
59 (@producers
60 (processed-by "wit-component" "$CARGO_PKG_VERSION")
61 )
62 )
63 (core module (;3;)
64 (type (;0;) (func (param i32 i32)))
65 (import "" "0" (func (;0;) (type 0)))
66 (import "" "1" (func (;1;) (type 0)))
67 (import "" "$imports" (table (;0;) 2 2 funcref))
68 (elem (;0;) (i32.const 0) func 0 1)
69 (@producers
70 (processed-by "wit-component" "$CARGO_PKG_VERSION")
71 )
72 )
73 (core instance (;0;) (instantiate 2))
74 (alias core export 0 "0" (core func (;0;)))
75 (core instance (;1;)
76 (export "foo" (func 0))
77 )
78 (core instance (;2;) (instantiate 0
79 (with "$root" (instance 1))
80 )
81 )
82 (alias core export 2 "memory" (core memory (;0;)))
83 (alias core export 0 "1" (core func (;1;)))
84 (core instance (;3;)
85 (export "foo" (func 1))
86 )
87 (core instance (;4;) (instantiate 1
88 (with "foo:foo/adapter-imports" (instance 3))
89 )
90 )
91 (alias core export 0 "$imports" (core table (;0;)))
92 (core func (;2;) (canon lower (func 0) (memory 0) string-encoding=utf8))
93 (alias export 0 "foo" (func (;1;)))
94 (core func (;3;) (canon lower (func 1) (memory 0) string-encoding=utf8))
95 (core instance (;5;)
96 (export "$imports" (table 0))
97 (export "0" (func 2))
98 (export "1" (func 3))
99 )
100 (core instance (;6;) (instantiate 3
101 (with "" (instance 5))
102 )
103 )
104 (type (;2;) (func))
105 (alias core export 2 "bar" (core func (;4;)))
106 (func (;2;) (type 2) (canon lift (core func 4)))
107 (export (;3;) "bar" (func 2))
108 (alias core export 4 "adapter-bar" (core func (;5;)))
109 (alias core export 4 "cabi_export_realloc" (core func (;6;)))
110 (func (;4;) (type 1) (canon lift (core func 5) (memory 0) (realloc 6) string-encoding=utf8))
111 (export (;5;) "adapter-bar" (func 4))
112 (@producers
113 (processed-by "wit-component" "$CARGO_PKG_VERSION")
114 )
115 )