Debian Codegraph @

crates/wit-component/tests/components/import-and-export-resource/component.wat

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