update CONTRIBUTING.md

This commit is contained in:
Christian Poveda 2022-09-26 10:55:05 -05:00
parent 76e8fa29f9
commit 4312df317a
No known key found for this signature in database
GPG Key ID: 3B422F347D81A9E8

View File

@ -326,9 +326,11 @@ generated Rust code are implemented using the [`syn`](https://docs.rs/syn) crate
If a new option can be implemented using the `syn` crate it should be added to
the `codegen::postprocessing` module by following these steps:
- Introduce a new `struct` with no fields.
- Implement the `PostProcessing` trait for the `struct`.
- Add the `struct` to the `decl_postprocessing` macro invocation.
- Introduce a new field to `BindgenOptions` for the option.
- Write a free function inside `codegen::postprocessing` implementing the
option. This function with the same name of the `BindgenOptions` field.
- Add a new value to the `codegen::postprocessing::PASSES` for the option using
the `pass!` macro.
## Pull Requests and Code Reviews