From 502f4b6a2b0423ebd620bc166868b880063cafbe Mon Sep 17 00:00:00 2001 From: LDprg Date: Sat, 8 Jul 2023 13:12:40 +0200 Subject: [PATCH] Add basic rust packages --- winapps-cli/Cargo.toml | 8 ++++++++ winapps-cli/src/main.rs | 3 +++ winapps-gui/Cargo.toml | 8 ++++++++ winapps-gui/src/main.rs | 3 +++ winapps/Cargo.toml | 8 ++++++++ winapps/src/lib.rs | 14 ++++++++++++++ 6 files changed, 44 insertions(+) create mode 100644 winapps-cli/Cargo.toml create mode 100644 winapps-cli/src/main.rs create mode 100644 winapps-gui/Cargo.toml create mode 100644 winapps-gui/src/main.rs create mode 100644 winapps/Cargo.toml create mode 100644 winapps/src/lib.rs diff --git a/winapps-cli/Cargo.toml b/winapps-cli/Cargo.toml new file mode 100644 index 0000000..e2af5fb --- /dev/null +++ b/winapps-cli/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "winapps-cli" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/winapps-cli/src/main.rs b/winapps-cli/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/winapps-cli/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/winapps-gui/Cargo.toml b/winapps-gui/Cargo.toml new file mode 100644 index 0000000..0917030 --- /dev/null +++ b/winapps-gui/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "winapps-gui" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/winapps-gui/src/main.rs b/winapps-gui/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/winapps-gui/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/winapps/Cargo.toml b/winapps/Cargo.toml new file mode 100644 index 0000000..95f2d32 --- /dev/null +++ b/winapps/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "winapps" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/winapps/src/lib.rs b/winapps/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/winapps/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +}