mirror of
https://gitee.com/openharmony/third_party_rust_bindgen
synced 2025-03-02 03:35:44 +00:00
update CONTRIBUTING.md
This commit is contained in:
parent
76e8fa29f9
commit
4312df317a
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user