diff options
author | Christian Poveda <christian.poveda@ferrous-systems.com> | 2022-09-26 10:55:05 -0500 |
---|---|---|
committer | Christian Poveda <christian.poveda@ferrous-systems.com> | 2022-09-26 10:55:05 -0500 |
commit | 4312df317a2fdf26ec889cb2f8d3ffe0b12ea4d3 (patch) | |
tree | 5d0430653d943b11e9f6484bcf64e9e74d3e7e9e | |
parent | 76e8fa29f945477b92c780aa782624a8d8a65488 (diff) |
update CONTRIBUTING.md
-rw-r--r-- | CONTRIBUTING.md | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3d757ccd..48e4a402 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 |