commit b747155f849b2ae5cea5cc185ea0ebc549bd0720 Author: Ondrej Novak Date: Mon Mar 2 22:14:31 2026 +0100 First commit 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); + } +}