From 63002cd3e99db6390293f5312df50a74d262388b Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Mon, 23 Aug 2021 08:54:49 -0300 Subject: [PATCH] Workspaces --- Cargo.toml | 11 ++++------- lib/Cargo.toml | 8 ++++++++ lib/src/lib.rs | 7 +++++++ src/main.rs | 3 --- 4 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 lib/Cargo.toml create mode 100644 lib/src/lib.rs delete mode 100644 src/main.rs diff --git a/Cargo.toml b/Cargo.toml index 182fdc3..4e843f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,5 @@ -[package] -name = "tin" -version = "0.1.0" -edition = "2018" +[workspace] -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] +members = [ + "lib" +] \ No newline at end of file diff --git a/lib/Cargo.toml b/lib/Cargo.toml new file mode 100644 index 0000000..49e2e49 --- /dev/null +++ b/lib/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "lib" +version = "0.1.0" +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/lib/src/lib.rs b/lib/src/lib.rs new file mode 100644 index 0000000..31e1bb2 --- /dev/null +++ b/lib/src/lib.rs @@ -0,0 +1,7 @@ +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + assert_eq!(2 + 2, 4); + } +} diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index e7a11a9..0000000 --- a/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - println!("Hello, world!"); -}