Skip to content

Commit 3dfbc60

Browse files
pvdrzemilio
authored andcommitted
update CONTRIBUTING.md section about syn
1 parent a372499 commit 3dfbc60

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -323,14 +323,12 @@ generated Rust code are implemented using the [`syn`](https://docs.rs/syn) crate
323323

324324
### Implementing new options using `syn`
325325

326-
Here is a list of recommendations to be followed if a new option can be
327-
implemented using the `syn` crate:
326+
If a new option can be implemented using the `syn` crate it should be added to
327+
the `codegen::postprocessing` module by following these steps:
328328

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.
329+
- Introduce a new `struct` with no fields.
330+
- Implement the `PostProcessing` trait for the `struct`.
331+
- Add the `struct` to the `decl_postprocessing` macro invocation.
334332

335333
## Pull Requests and Code Reviews
336334

0 commit comments

Comments
 (0)