From affa693b8d380cd0a9de213ff79f55fdd8f13208 Mon Sep 17 00:00:00 2001 From: aleteoryx Date: Mon, 7 Oct 2024 13:47:25 -0400 Subject: [PATCH] cargo shit --- rust/Cargo.toml | 3 +++ rust/tabbde-core/Cargo.toml | 6 ++++++ rust/tabbde-core/src/lib.rs | 14 ++++++++++++++ rust/tabbde-wm/Cargo.toml | 6 ++++++ rust/tabbde-wm/src/main.rs | 3 +++ 5 files changed, 32 insertions(+) create mode 100644 rust/Cargo.toml create mode 100644 rust/tabbde-core/Cargo.toml create mode 100644 rust/tabbde-core/src/lib.rs create mode 100644 rust/tabbde-wm/Cargo.toml create mode 100644 rust/tabbde-wm/src/main.rs diff --git a/rust/Cargo.toml b/rust/Cargo.toml new file mode 100644 index 0000000..9ebc0f7 --- /dev/null +++ b/rust/Cargo.toml @@ -0,0 +1,3 @@ +[workspace] +resolver = "2" +members = ["tabbde-wm", "tabbde-core"] diff --git a/rust/tabbde-core/Cargo.toml b/rust/tabbde-core/Cargo.toml new file mode 100644 index 0000000..c2b2e0d --- /dev/null +++ b/rust/tabbde-core/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "tabbde-core" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/rust/tabbde-core/src/lib.rs b/rust/tabbde-core/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/rust/tabbde-core/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/rust/tabbde-wm/Cargo.toml b/rust/tabbde-wm/Cargo.toml new file mode 100644 index 0000000..a84db71 --- /dev/null +++ b/rust/tabbde-wm/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "tabbde-wm" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/rust/tabbde-wm/src/main.rs b/rust/tabbde-wm/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/rust/tabbde-wm/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} -- 2.45.2