File tree 1 file changed +13
-1
lines changed
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
318
318
319
319
The final phase is generating Rust source text from the analyzed IR, and it is
320
320
defined 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.
322
334
323
335
## Pull Requests and Code Reviews
324
336
You can’t perform that action at this time.
0 commit comments