File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -318,7 +318,19 @@ parameters a given type uses. The analyses are defined in
318318
319319The final phase is generating Rust source text from the analyzed IR, and it is
320320defined in ` src/codegen/* ` . We use the ` quote ` crate, which provides the `quote!
321- { ... }` macro for quasi-quoting Rust forms.
321+ { ... }` macro for quasi-quoting Rust forms. Some options that affect the
322+ generated Rust code are implemented using the [ ` syn ` ] ( https://docs.rs/syn ) crate.
323+
324+ ### Implementing new options using ` syn `
325+
326+ Here is a list of recommendations to be followed if a new option can be
327+ implemented using the ` syn ` crate:
328+
329+ - The ` BindgenOptions::require_syn ` method must be updated to reflect that this
330+ new option requires parsing the generated Rust code with ` syn ` .
331+
332+ - The implementation of the new option should be added at the end of
333+ ` Bindings::generate ` , inside the ` if options.require_syn() { ... } ` block.
322334
323335## Pull Requests and Code Reviews
324336
You can’t perform that action at this time.
0 commit comments