Patch-Crate
patch-crate lets rust app developer instantly make and keep fixes to rust crate dependencies. It's a vital band-aid for those of us living on the bleeding edge.
# fix a bug in one of your dependencies
# run patch-crate to create a .patch file
# commit the patch file to share the fix with your team
Get started
-
Install command
patch-crate
-
Add broken crate in your Cargo.toml
[] = ["some-crate"] [] = { ="./target/patch/some-crate-1.0.110" }
-
Download the crate's source code into
target/patch
-
Fix the broken code in
target/patch/some-crate
directly. -
Create a crate-patch
-
Commit the patch file to share the fix with your team
-
Instead of running cargo patch-crate its also possible to add a build.rs file like this:
To make it work, add the patch-crate library to the build-dependencies
= "0.1"
Credits
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.