File tree Expand file tree Collapse file tree 7 files changed +124
-45
lines changed
tests/runtime/rust/two-wit-packages Expand file tree Collapse file tree 7 files changed +124
-45
lines changed Original file line number Diff line number Diff line change @@ -46,13 +46,13 @@ prettyplease = "0.2.20"
4646syn = { version = " 2.0.89" , features = [" printing" ] }
4747futures = " 0.3.31"
4848
49- wat = " 1.245.0 "
50- wasmparser = " 0.245.0 "
51- wasm-encoder = " 0.245.0 "
52- wasm-metadata = { version = " 0.245.0 " , default-features = false }
53- wit-parser = " 0.245.0 "
54- wit-component = " 0.245.0 "
55- wasm-compose = " 0.245.0 "
49+ wat = " 1.245.1 "
50+ wasmparser = " 0.245.1 "
51+ wasm-encoder = " 0.245.1 "
52+ wasm-metadata = { version = " 0.245.1 " , default-features = false }
53+ wit-parser = " 0.245.1 "
54+ wit-component = " 0.245.1 "
55+ wasm-compose = " 0.245.1 "
5656
5757wit-bindgen-core = { path = ' crates/core' , version = ' 0.53.0' }
5858wit-bindgen-c = { path = ' crates/c' , version = ' 0.53.0' }
Original file line number Diff line number Diff line change 1+ package example:composition;
2+
3+ let a = new test:test { ... };
4+ let b = new test:intermediate { ...a, ... };
5+ let c = new test:runner { ...b, ... };
6+
7+ export c...;
Original file line number Diff line number Diff line change 1+ include ! ( env!( "BINDINGS" ) ) ;
2+
3+ struct Component ;
4+ export ! ( Component ) ;
5+
6+ impl exports:: a:: b:: x:: Guest for Component {
7+ fn f1 ( ) {
8+ a:: b:: x:: f1 ( )
9+ }
10+ }
11+
12+ impl exports:: other:: c:: x:: Guest for Component {
13+ fn f2 ( ) {
14+ other:: c:: x:: f2 ( )
15+ }
16+ }
Original file line number Diff line number Diff line change 1+ include ! ( env!( "BINDINGS" ) ) ;
2+
3+ struct Component ;
4+ export ! ( Component ) ;
5+
6+ impl Guest for Component {
7+ fn run ( ) {
8+ a:: b:: x:: f1 ( ) ;
9+ other:: c:: x:: f2 ( ) ;
10+ }
11+ }
Original file line number Diff line number Diff line change 1+ include ! ( env!( "BINDINGS" ) ) ;
2+
3+ struct Component ;
4+ export ! ( Component ) ;
5+
6+ impl exports:: a:: b:: x:: Guest for Component {
7+ fn f1 ( ) { }
8+ }
9+
10+ impl exports:: other:: c:: x:: Guest for Component {
11+ fn f2 ( ) { }
12+ }
Original file line number Diff line number Diff line change 1+ //@ wac = 'compose.wac'
2+ //@ dependencies = ['intermediate', 'test']
3+
4+ package a : b ;
5+
6+ world runner {
7+ import x ;
8+ import other :c /x ;
9+
10+ export run : func ();
11+ }
12+
13+ world intermediate {
14+ import x ;
15+ import other :c /x ;
16+ export x ;
17+ export other :c /x ;
18+ }
19+
20+ world test {
21+ export x ;
22+ export other :c /x ;
23+ }
24+
25+ interface x {
26+ f1 : func ();
27+ }
28+
29+ package other : c {
30+ interface x {
31+ f2 : func ();
32+ }
33+ }
You can’t perform that action at this time.
0 commit comments