Debian Codegraph @

crates/wit-component/tests/components/adapt-preview1/component.wat

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