2024-01-22 18:47:53 +01:00
The goal of this package is to be a dropped in replacement for the [diffutils commands ](https://www.gnu.org/software/diffutils/ ) in Rust.
2021-02-23 22:17:58 -07:00
2021-03-09 16:23:46 -07:00
Based on the incomplete diff generator in https://github.com/rust-lang/rust/blob/master/src/tools/compiletest/src/runtest.rs, and made to be compatible with GNU's diff and patch tools.
2021-02-23 22:17:58 -07:00
```
2024-01-22 18:45:41 +01:00
~/diffutils$ cargo run -- diff -u3 Cargo.lock Cargo.toml
2021-02-23 22:17:58 -07:00
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
2021-03-09 16:23:46 -07:00
Running `target/debug/diff -u3 Cargo.lock Cargo.toml`
2024-01-22 18:45:41 +01:00
--- Cargo.lock
+++ Cargo.toml
2021-03-09 16:23:46 -07:00
@@ -1,39 +1,7 @@
2021-02-23 22:17:58 -07:00
-# This file is automatically @generated by Cargo.
-# It is not intended for manual editing.
2021-03-09 16:23:46 -07:00
-version = 3
-
-[[package]]
-name = "context-diff"
-version = "0.1.0"
-dependencies = [
- "diff 0.1.12",
-]
-
-[[package]]
-name = "diff"
-version = "0.1.0"
-dependencies = [
- "context-diff",
- "normal-diff",
- "unified-diff",
-]
-
2021-02-23 22:17:58 -07:00
-[[package]]
-name = "diff"
-version = "0.1.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499"
-
-[[package]]
2021-03-09 16:23:46 -07:00
-name = "normal-diff"
-version = "0.1.0"
2021-02-23 22:17:58 -07:00
-dependencies = [
2021-03-09 16:23:46 -07:00
- "diff 0.1.12",
-]
-
-[[package]]
-name = "unified-diff"
-version = "0.3.0"
-dependencies = [
- "diff 0.1.12",
+[workspace]
+members = [
+ "lib/unified-diff",
+ "lib/context-diff",
+ "lib/normal-diff",
+ "bin/diff",
2021-02-23 22:17:58 -07:00
]
```