From b747155f849b2ae5cea5cc185ea0ebc549bd0720 Mon Sep 17 00:00:00 2001 From: Ondrej Novak Date: Mon, 2 Mar 2026 22:14:31 +0100 Subject: [PATCH] First commit --- Cargo.toml | 4 ++++ protocol/.gitignore | 1 + protocol/Cargo.toml | 6 ++++++ protocol/src/lib.rs | 14 ++++++++++++++ 4 files changed, 25 insertions(+) create mode 100644 Cargo.toml create mode 100644 protocol/.gitignore create mode 100644 protocol/Cargo.toml create mode 100644 protocol/src/lib.rs diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..fa26fdb --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,4 @@ +[workspace] +resolver = "3" +members = ["protocol"] + diff --git a/protocol/.gitignore b/protocol/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/protocol/.gitignore @@ -0,0 +1 @@ +/target diff --git a/protocol/Cargo.toml b/protocol/Cargo.toml new file mode 100644 index 0000000..321b140 --- /dev/null +++ b/protocol/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "protocol" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/protocol/src/lib.rs b/protocol/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/protocol/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); + } +}