Debian Codegraph @

crates/wit-parser/tests/ui/multi-package-gated-include.wit

raw
1 package wasmtime:test;
2
3 world test{
4 @unstable(feature = active)
5 include wasi:unstable/[email protected];
6 include wasi:foo/[email protected];
7 include wasi:someother/[email protected];
8 }
9
10 world test-ordered {
11 include wasi:someother/[email protected];
12 include wasi:foo/[email protected];
13 @unstable(feature = active)
14 include wasi:unstable/[email protected];
15 }
16
17 world test-no-stability {
18 include wasi:someother/[email protected];
19 include wasi:foo/[email protected];
20 include wasi:unstable/[email protected];
21 }
22
23 world test-only-stable {
24 include wasi:foo/[email protected];
25 }
26
27 world test-only-stable-with-feature {
28 @unstable(feature = active)
29 include wasi:foo/[email protected];
30 }
31
32 // in test this results in world with nothing
33 world test-only-stable-with-in-active-feature {
34 @unstable(feature = in-active)
35 include wasi:foo/[email protected];
36 }
37
38 package wasi:[email protected] {
39 @unstable(feature = active)
40 world imports {
41 @unstable(feature = active)
42 use wasi:dep2/[email protected].{stable-resource};
43 @unstable(feature = active)
44 use wasi:dep-unversioned/unversioned.{unversioned-resource};
45 @unstable(feature = active)
46 use wasi:dep-unstable/unstable.{unstable-resource};
47 }
48 }
49
50 package wasi:[email protected] {
51 @since(version = 0.2.0)
52 world imports {
53 import someother;
54 }
55
56 @since(version = 0.2.0)
57 interface someother {
58 @since(version = 0.2.0)
59 resource someother-resource {
60 }
61 }
62 }
63
64
65
66 package wasi:[email protected] {
67 @since(version = 0.2.0)
68 world imports {
69 @since(version = 0.2.0)
70 include wasi:dep2/[email protected];
71 include wasi:dep-unversioned/imports;
72 include wasi:dep-unstable/imports;
73 }
74 }
75
76 package wasi:[email protected] {
77 @since(version = 0.2.0)
78 world imports {
79 @since(version = 0.2.0)
80 import stable;
81 }
82 @since(version = 0.2.0)
83 interface stable {
84 resource stable-resource {
85 }
86 }
87 }
88
89 package wasi:dep-unversioned{
90 world imports {
91 import unversioned;
92 }
93 interface unversioned {
94 resource unversioned-resource {
95
96 }
97 }
98 }
99
100 package wasi:dep-unstable{
101 @unstable(feature = active)
102 world imports {
103 @unstable(feature = active)
104 import unstable;
105 }
106 @unstable(feature = active)
107 interface unstable {
108 @unstable(feature = active)
109 resource unstable-resource {
110
111 }
112 }
113 }
114