0

Add a note to //docs/rust.md about how patches are applied

It took me some time to figure this out, both to learn if the version
number mismatch was important, and how to apply the patches by hand.

Change-Id: I3312435a0dcdddb0f4e04e199da5c334e80248ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6249083
Commit-Queue: Dustin Mitchell <djmitche@chromium.org>
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1418829}
This commit is contained in:
Dustin J. Mitchell
2025-02-11 12:15:00 -08:00
committed by Chromium LUCI CQ
parent 4833740f2f
commit 3d17cd4bee

@ -114,6 +114,10 @@ might exist if the "foo" crate was patched with a couple of changes:
//third_party/rust/chromium_crates_io/patches/foo/patches/0002-Other-changes.diff
```
Patches are applied with `-p6 --directory
third_party/rust/chromium_crates_io/vendor/<crate>-<version>`, effectively
ignoring the version numbers in the patch files.
The recommended procedure to create such patches is:
1. Commit the plain new version of the crate to your local git branch