From f44aa226604730ff1fca31c1f4892858201523b9 Mon Sep 17 00:00:00 2001 From: Isaac Corbrey Date: Wed, 1 Oct 2025 13:32:18 +0000 Subject: [PATCH] core: Initialize project Change-Id: wvpunuzuvxzovuqpsztuzquxuuwsumku --- Cargo.toml | 2 +- footnotes_core/Cargo.toml | 6 ++++++ footnotes_core/src/lib.rs | 14 ++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 footnotes_core/Cargo.toml create mode 100644 footnotes_core/src/lib.rs diff --git a/Cargo.toml b/Cargo.toml index b29effa..6261a66 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,5 +4,5 @@ version = "0.1.0" edition = "2024" [workspace] -members = ["footnotes_appview"] +members = ["footnotes_appview", "footnotes_core"] resolver = "2" diff --git a/footnotes_core/Cargo.toml b/footnotes_core/Cargo.toml new file mode 100644 index 0000000..49f94f1 --- /dev/null +++ b/footnotes_core/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "footnotes_core" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/footnotes_core/src/lib.rs b/footnotes_core/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/footnotes_core/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.43.0