modifying vendored Rust crates locally

With the fixes for bug 1323557 [1] and cargo-vendor issue #71 [2], it's 
now more straightforward to modify a vendored Rust crate to test changes 
locally or on tryserver.

To do so, specify the crate's vendored path in the [patch.crates-io] 
section of the top-level Cargo.toml file. For example, to modify the 
"zip" crate, add this line to that section:

zip = { path = "third_party/rust/zip" }

Then run `mach vendor rust`, which will update Cargo.lock with the 
patched location of the crate:

$ mach vendor rust
       Adding zip v0.3.1 (file:///path/to/workdir/third_party/rust/zip)
     Removing zip v0.3.1

You'll need the latest version of cargo-vendor, 0.1.14, which you can 
get via `cargo install --force cargo-vendor`.



5/14/2018 10:22:17 PM 6473 articles. 0 followers. Post Follow

0 Replies

Similar Articles

[PageSpeed] 29