From 4312df317a2fdf26ec889cb2f8d3ffe0b12ea4d3 Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Mon, 26 Sep 2022 10:55:05 -0500 Subject: update CONTRIBUTING.md --- CONTRIBUTING.md | 8 +++++--- 1 file 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 -- cgit v1.2.3