From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
Date: Thu, 2 Jan 2025 13:06:01 +0000 (+0530)
Subject: rust: add proto1, which has nothing interesting as of now
X-Git-Url: https://git.rkrishnan.org/components/frontends/%22file:/%3C?a=commitdiff_plain;h=refs%2Fheads%2Friir;p=pihpsdr.git

rust: add proto1, which has nothing interesting as of now
---

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);
+    }
+}