From c666a3960bcaaf0688b869224d8eec2b361bb2b5 Mon Sep 17 00:00:00 2001 From: BeastLe9enD Date: Sat, 5 Apr 2025 15:20:16 +0200 Subject: [PATCH] Add initial cargo crate --- Source/land_of_barl/Cargo.toml | 12 ++++++++++++ Source/land_of_barl/src/lib.rs | 14 ++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Source/land_of_barl/Cargo.toml create mode 100644 Source/land_of_barl/src/lib.rs diff --git a/Source/land_of_barl/Cargo.toml b/Source/land_of_barl/Cargo.toml new file mode 100644 index 0000000..2dd3850 --- /dev/null +++ b/Source/land_of_barl/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "land_of_barl" +version = "0.1.0" +edition = "2024" + +[dependencies] + +[build-dependencies] +bindgen = "0.71.1" + +[lib] +crate-type = ["staticlib"] \ No newline at end of file diff --git a/Source/land_of_barl/src/lib.rs b/Source/land_of_barl/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/Source/land_of_barl/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); + } +}