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:
217217wit_bindgen :: generate! ({
218218 // the name of the world in the `*.wit` input file
219219 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- },
228220});
229221
230222// Define a custom type and implement the generated `Guest` trait for it which
@@ -237,6 +229,10 @@ impl Guest for MyHost {
237229 print (" Hello, world!" );
238230 }
239231}
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 );
240236```
241237
242238By using [ ` cargo expand ` ] ( https://github.com/dtolnay/cargo-expand ) or `cargo
You can’t perform that action at this time.
0 commit comments