From 11cf8515ccb0cb6b4eee96e281581c79066d8ef1 Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan Date: Thu, 2 Jan 2025 18:36:01 +0530 Subject: [PATCH] rust: add proto1, which has nothing interesting as of now --- rust/Cargo.toml | 2 +- rust/proto1/Cargo.toml | 6 ++++++ rust/proto1/src/lib.rs | 14 ++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 rust/proto1/Cargo.toml create mode 100644 rust/proto1/src/lib.rs diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 1f226d4..08ffbb4 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,3 +1,3 @@ [workspace] resolver = "2" -members = [ "discovery" , "property"] +members = [ "discovery" , "property", "proto1"] diff --git a/rust/proto1/Cargo.toml b/rust/proto1/Cargo.toml new file mode 100644 index 0000000..4bb2ba7 --- /dev/null +++ b/rust/proto1/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "proto1" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/rust/proto1/src/lib.rs b/rust/proto1/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/rust/proto1/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); + } +} -- 2.45.2