Refactor into separate bin and lib folders

This commit is contained in:
Michael Howell
2021-07-21 13:40:52 -07:00
parent da05a5254b
commit 582259a867
7 changed files with 18 additions and 15 deletions
+15
View File
@@ -5,3 +5,18 @@ members = [
"lib/normal-diff",
"bin/diff",
]
[package]
name = "diffutils"
version = "0.3.0"
authors = ["Michael Howell <michael@notriddle.com>"]
edition = "2018"
[dependencies]
context-diff = { path = "lib/context-diff", version = "0.3.0" }
normal-diff = { path = "lib/normal-diff", version = "0.3.0" }
unified-diff = { path = "lib/unified-diff", version = "0.3.0" }
[[bin]]
name = "diffutils"
path = "bin/main.rs"
+1 -1
View File
@@ -3,7 +3,7 @@ A package (currently just `diff`, but eventually more) of programs related to fi
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.
```
~/diffutils$ cargo run -- -u3 Cargo.lock Cargo.toml
~/diffutils$ cargo run -- diff -u3 Cargo.lock Cargo.toml
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/diff -u3 Cargo.lock Cargo.toml`
--- Cargo.lock
-12
View File
@@ -1,12 +0,0 @@
[package]
name = "diff"
version = "0.1.0"
authors = ["Michael Howell <michael@notriddle.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
context-diff = { path = "../../lib/context-diff" }
normal-diff = { path = "../../lib/normal-diff" }
unified-diff = { path = "../../lib/unified-diff" }
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "context-diff"
version = "0.1.0"
version = "0.3.0"
authors = [
"Michael Howell <michael@notriddle.com>",
"The Rust Project Developers"
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "normal-diff"
version = "0.1.0"
version = "0.3.0"
authors = [
"Michael Howell <michael@notriddle.com>",
"The Rust Project Developers"