From 8886be1cb9405e89e272f307a2897fd2f1996a71 Mon Sep 17 00:00:00 2001 From: Janis Date: Mon, 19 Jun 2023 18:36:39 +0200 Subject: [PATCH] added lib targets --- sdk-generator/.gitignore | 2 ++ sdk-generator/Cargo.toml | 8 ++++++++ sdk-generator/src/lib.rs | 14 ++++++++++++++ sdk-serializer/.gitignore | 2 ++ sdk-serializer/Cargo.toml | 8 ++++++++ sdk-serializer/src/lib.rs | 14 ++++++++++++++ 6 files changed, 48 insertions(+) create mode 100644 sdk-generator/.gitignore create mode 100644 sdk-generator/Cargo.toml create mode 100644 sdk-generator/src/lib.rs create mode 100644 sdk-serializer/.gitignore create mode 100644 sdk-serializer/Cargo.toml create mode 100644 sdk-serializer/src/lib.rs diff --git a/sdk-generator/.gitignore b/sdk-generator/.gitignore new file mode 100644 index 0000000..4fffb2f --- /dev/null +++ b/sdk-generator/.gitignore @@ -0,0 +1,2 @@ +/target +/Cargo.lock diff --git a/sdk-generator/Cargo.toml b/sdk-generator/Cargo.toml new file mode 100644 index 0000000..911d7ed --- /dev/null +++ b/sdk-generator/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "sdk-generator" +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/sdk-generator/src/lib.rs b/sdk-generator/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/sdk-generator/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); + } +} diff --git a/sdk-serializer/.gitignore b/sdk-serializer/.gitignore new file mode 100644 index 0000000..4fffb2f --- /dev/null +++ b/sdk-serializer/.gitignore @@ -0,0 +1,2 @@ +/target +/Cargo.lock diff --git a/sdk-serializer/Cargo.toml b/sdk-serializer/Cargo.toml new file mode 100644 index 0000000..039a960 --- /dev/null +++ b/sdk-serializer/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "sdk-serializer" +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/sdk-serializer/src/lib.rs b/sdk-serializer/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/sdk-serializer/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); + } +}