From 0de795496ba7eadabd583e6a830895e32b539ca9 Mon Sep 17 00:00:00 2001 From: danielsanchezq Date: Wed, 21 Sep 2022 16:06:27 +0200 Subject: [PATCH] Main project structure --- .gitignore | 3 +++ Cargo.lock | 11 +++++++++++ Cargo.toml | 6 ++++++ README.md | 0 waku-sys/Cargo.toml | 7 +++++++ waku-sys/build.rs | 1 + waku-sys/src/lib.rs | 14 ++++++++++++++ waku/Cargo.toml | 8 ++++++++ waku/src/lib.rs | 14 ++++++++++++++ 9 files changed, 64 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 README.md create mode 100644 waku-sys/Cargo.toml create mode 100644 waku-sys/build.rs create mode 100644 waku-sys/src/lib.rs create mode 100644 waku/Cargo.toml create mode 100644 waku/src/lib.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ab1dd7e --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/target +/Cargo.lock +/.idea \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..5476fcd --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,11 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "waku" +version = "0.1.0" + +[[package]] +name = "waku-sys" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..ccf8235 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,6 @@ +[workspace] + +members = [ + "waku", + "waku-sys" +] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/waku-sys/Cargo.toml b/waku-sys/Cargo.toml new file mode 100644 index 0000000..f527103 --- /dev/null +++ b/waku-sys/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "waku-sys" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[dependencies] \ No newline at end of file diff --git a/waku-sys/build.rs b/waku-sys/build.rs new file mode 100644 index 0000000..e71fdf5 --- /dev/null +++ b/waku-sys/build.rs @@ -0,0 +1 @@ +fn main() {} \ No newline at end of file diff --git a/waku-sys/src/lib.rs b/waku-sys/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/waku-sys/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/waku/Cargo.toml b/waku/Cargo.toml new file mode 100644 index 0000000..5814677 --- /dev/null +++ b/waku/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "waku" +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/waku/src/lib.rs b/waku/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/waku/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); + } +}