From 9a3e367a4c052cb3f5ebe8f138286fdae42769a0 Mon Sep 17 00:00:00 2001 From: core Date: Fri, 9 Dec 2022 19:18:21 -0500 Subject: [PATCH] [wginterface] initial commit --- Cargo.toml | 4 ++++ wginterface/Cargo.toml | 8 ++++++++ wginterface/src/lib.rs | 14 ++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 Cargo.toml create mode 100644 wginterface/Cargo.toml create mode 100644 wginterface/src/lib.rs diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..7399cdd --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,4 @@ +[workspace] +members = [ + "wginterface" +] diff --git a/wginterface/Cargo.toml b/wginterface/Cargo.toml new file mode 100644 index 0000000..437a648 --- /dev/null +++ b/wginterface/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "wginterface" +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/wginterface/src/lib.rs b/wginterface/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/wginterface/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); + } +}