From 2c11839d2162f3d66e91195e8725771837e8e5b0 Mon Sep 17 00:00:00 2001 From: antifallobst Date: Thu, 30 Nov 2023 15:40:58 +0100 Subject: [PATCH] feat: added loader crate --- lithium-loader/.gitignore | 1 + lithium-loader/Cargo.lock | 7 +++++++ lithium-loader/Cargo.toml | 8 ++++++++ lithium-loader/src/lib.rs | 14 ++++++++++++++ 4 files changed, 30 insertions(+) create mode 100644 lithium-loader/.gitignore create mode 100644 lithium-loader/Cargo.lock create mode 100644 lithium-loader/Cargo.toml create mode 100644 lithium-loader/src/lib.rs diff --git a/lithium-loader/.gitignore b/lithium-loader/.gitignore new file mode 100644 index 0000000..c41cc9e --- /dev/null +++ b/lithium-loader/.gitignore @@ -0,0 +1 @@ +/target \ No newline at end of file diff --git a/lithium-loader/Cargo.lock b/lithium-loader/Cargo.lock new file mode 100644 index 0000000..3288c74 --- /dev/null +++ b/lithium-loader/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "lithium-loader" +version = "0.1.0" diff --git a/lithium-loader/Cargo.toml b/lithium-loader/Cargo.toml new file mode 100644 index 0000000..d01e847 --- /dev/null +++ b/lithium-loader/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "lithium-loader" +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/lithium-loader/src/lib.rs b/lithium-loader/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/lithium-loader/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); + } +}