Maurice Lam | f26f137 | 2022-12-02 00:15:07 +0000 | [diff] [blame^] | 1 | ## Steps for updating this crate |
| 2 | |
| 3 | 1. In order to run cargo2android, for this crate, the BoringSSL rust bindings first needs to be |
| 4 | built. Copy `googletest` to `boringssl`, which is needed to build the rust bindings |
| 5 | |
| 6 | ``` |
| 7 | $ cp -r external/googletest/googletest external/boringssl/src/third_party/ |
| 8 | ``` |
| 9 | 2. Build the rust bindings (More information at |
| 10 | https://boringssl.googlesource.com/boringssl/+/HEAD/BUILDING.md) |
| 11 | |
| 12 | ``` |
| 13 | $ cd external/boringssl |
| 14 | $ mkdir build && cd build |
| 15 | $ cmake .. -DRUST_BINDINGS=x86_64-unknown-linux-gnu |
| 16 | $ make |
| 17 | ``` |
| 18 | 3. Run `tools/external_updater/updater.sh update rust/crates/openssl`. Cargo errors causing the |
| 19 | command to fail are expected (since the boringSSL crate is outside of the `openssl` directory, |
| 20 | redshell is not able to access it). |
| 21 | 4. The repository should now be in a `tmp_auto_upgrade` branch, and the Android.bp will contain |
| 22 | some error message. |
| 23 | 5. Run cargo2android |
| 24 | |
| 25 | ``` |
| 26 | $ cargo2android.py --config ./cargo2android.json |
| 27 | ``` |
| 28 | 6. Clean up the changes in external/boringssl repository, and double check that the resulting |
| 29 | Android.bp builds correctly by running `m libopenssl`. |
| 30 | 7. Commit the changes and upload the CL. |
| 31 | 8. `external/rust/crates/openssl-macros` should also be updated at the same time. |