File tree Expand file tree Collapse file tree
component-model/src/language-support Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,13 +145,17 @@ Your code should look something like the following:
145145
146146There are a few points of note in the code listing above:
147147
148- - The ` AdderComponent ` struct is introduced, but is only useful as an implementer of the ` Guest ` trait.
149- - The ` bindings::exports::docs::adder::add::Guest ` trait mirrors the ` docs:adder/add ` interface
150- - Our ` AdderComponent ` implements (in both the Rust sense and the WIT sense) the
151- - The [ ` export!() ` macro] [ export-macro ] is generated by ` wit_bindgen::generate! ` macro, and does important setup
152- - ` export! ` is easiest used from inside the ` bindings ` module, * but* we need to refer to the ` super::AdderComponent ` struct
148+ 1 . The ` AdderComponent ` struct is introduced, but is only useful as an implementer of the ` Guest ` trait.
149+ 2 . The ` bindings::exports::docs::adder::add::Guest ` trait mirrors the ` docs:adder/add ` interface that is exported.
150+ 3 . Given (1) and (2), ` AdderComponent ` implements (in the WIT sense) the ` adder ` world, via the generated bindings.
151+ 4 . The [ ` export!() ` macro] [ export-macro ] is generated by ` wit_bindgen::generate! ` macro, and does important setup.
152+ - ` export! ` is easiest used from inside the ` bindings ` module, * but* we need to refer to the ` super::AdderComponent ` struct
153+
154+ > [ !NOTE]
155+ > To dive into the code generated by the ` wit_bindgen::generate! ` macro, you can use the [ ` cargo-expand ` crate] [ crates-cargo-expand ]
153156
154157[ export-macro ] : https://docs.rs/wit-bindgen/latest/wit_bindgen/macro.generate.html#exports-the-export-macro
158+ [ crates-cargo-expand ] : https://crates.io/crates/cargo-expand
155159
156160## 6. Building a Component
157161
You can’t perform that action at this time.
0 commit comments