File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -217,14 +217,6 @@ file. Example code using this then looks like:
217
217
wit_bindgen :: generate! ({
218
218
// the name of the world in the `*.wit` input file
219
219
world : " host" ,
220
-
221
- // For all exported worlds, interfaces, and resources, this specifies what
222
- // type they're corresponding to in this module. In this case the `MyHost`
223
- // struct defined below is going to define the exports of the `world`,
224
- // namely the `run` function.
225
- exports : {
226
- world : MyHost ,
227
- },
228
220
});
229
221
230
222
// Define a custom type and implement the generated `Guest` trait for it which
@@ -237,6 +229,10 @@ impl Guest for MyHost {
237
229
print (" Hello, world!" );
238
230
}
239
231
}
232
+
233
+ // export! defines that the `MyHost` struct defined below is going to define
234
+ // the exports of the `world`, namely the `run` function.
235
+ export! (MyHost );
240
236
```
241
237
242
238
By using [ ` cargo expand ` ] ( https://github.com/dtolnay/cargo-expand ) or `cargo
You can’t perform that action at this time.
0 commit comments