Add initial cargo crate
This commit is contained in:
parent
76d73a6a35
commit
c666a3960b
12
Source/land_of_barl/Cargo.toml
Normal file
12
Source/land_of_barl/Cargo.toml
Normal file
@ -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"]
|
14
Source/land_of_barl/src/lib.rs
Normal file
14
Source/land_of_barl/src/lib.rs
Normal file
@ -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);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user