Debian Codegraph @

crates/wit-component/tests/components/tricky-resources4/component.wat

raw
1 (component
2 (core module (;0;)
3 (type (;0;) (func (param i32) (result i32)))
4 (type (;1;) (func (result i32)))
5 (import "[export]foo:bar/name" "[resource-new]name" (func $new (;0;) (type 0)))
6 (export "foo:bar/name#foo" (func 1))
7 (func (;1;) (type 1) (result i32)
8 i32.const 100
9 call $new
10 )
11 (@producers
12 (processed-by "wit-component" "$CARGO_PKG_VERSION")
13 (processed-by "my-fake-bindgen" "123.45")
14 )
15 )
16 (type (;0;) (resource (rep i32)))
17 (core func (;0;) (canon resource.new 0))
18 (core instance (;0;)
19 (export "[resource-new]name" (func 0))
20 )
21 (core instance (;1;) (instantiate 0
22 (with "[export]foo:bar/name" (instance 0))
23 )
24 )
25 (type (;1;) (own 0))
26 (type (;2;) (func (result 1)))
27 (alias core export 1 "foo:bar/name#foo" (core func (;1;)))
28 (func (;0;) (type 2) (canon lift (core func 1)))
29 (component (;0;)
30 (import "import-type-name" (type (;0;) (sub resource)))
31 (import "import-type-handle" (type (;1;) (eq 0)))
32 (type (;2;) (own 1))
33 (type (;3;) (func (result 2)))
34 (import "import-func-foo" (func (;0;) (type 3)))
35 (export (;4;) "name" (type 0))
36 (export (;5;) "handle" (type 4))
37 (type (;6;) (own 5))
38 (type (;7;) (func (result 6)))
39 (export (;1;) "foo" (func 0) (func (type 7)))
40 )
41 (instance (;0;) (instantiate 0
42 (with "import-func-foo" (func 0))
43 (with "import-type-name" (type 0))
44 (with "import-type-handle" (type 0))
45 )
46 )
47 (export (;1;) "foo:bar/name" (instance 0))
48 (alias export 1 "name" (type (;3;)))
49 (alias export 1 "handle" (type (;4;)))
50 (component (;1;)
51 (import "import-type-name" (type (;0;) (sub resource)))
52 (import "import-type-handle" (type (;1;) (eq 0)))
53 (export (;2;) "handle" (type 1))
54 )
55 (instance (;2;) (instantiate 1
56 (with "import-type-name" (type 3))
57 (with "import-type-handle" (type 4))
58 )
59 )
60 (export (;3;) "name" (instance 2))
61 (@producers
62 (processed-by "wit-component" "$CARGO_PKG_VERSION")
63 )
64 )