Debian Codegraph @

tests/cli/importize.wit.simple-toplevel.stdout

raw
1 /// RUN[simple]: component wit --importize-world simple %
2 /// RUN[simple-rename]: component wit --importize-world simple-rename --importize-out-world-name test-rename %
3 /// RUN[simple-component]: component embed --dummy --world simple % | /
4 /// component wit --importize
5 /// RUN[with-deps]: component wit --importize-world with-deps %
6 /// RUN[simple-toplevel]: component wit --importize-world simple-toplevel %
7 /// RUN[toplevel-deps]: component wit --importize-world toplevel-deps %
8 /// FAIL[fail1]: component wit --importize-world fail1 %
9 /// RUN[trim-imports]: component wit --importize-world trim-imports %
10 /// RUN[tricky-import]: component wit --importize-world tricky-import %
11 package importize:importize;
12
13 interface t {
14 resource r;
15 }
16
17 interface bar {
18 use t.{r};
19
20 record foo {
21 x: string,
22 }
23
24 importize: func(name: r);
25 }
26
27 interface qux {
28 use bar.{foo};
29
30 blah: func(boo: foo);
31 }
32
33 interface something-else-dep {
34 type t = u32;
35 }
36
37 interface a {
38 }
39
40 interface b {
41 }
42
43 interface with-dep {
44 type t = u32;
45 }
46
47 world simple {
48 export t;
49 }
50 world simple-rename {
51 export t;
52 }
53 world with-deps {
54 import t;
55 import bar;
56
57 export qux;
58 }
59 world toplevel-deps {
60 import something-else-dep;
61
62 type s = u32;
63
64 export bar: func() -> s;
65 export something-else: interface {
66 use something-else-dep.{t};
67
68 bar: func() -> t;
69 }
70 }
71 world fail1 {
72 type foo = u32;
73
74 export foo: func() -> foo;
75 }
76 world trim-imports {
77 import a;
78 import bar: interface {
79 }
80
81 type t = u32;
82 import foo: func();
83
84 export b;
85 }
86 world tricky-import {
87 import with-dep;
88 use with-dep.{t};
89
90 export f: func() -> t;
91 }
92 world simple-toplevel-importized {
93 import something: interface {
94 foo: func();
95 }
96 import foo: func();
97 }