stub rust lib

main
Bel LaPointe 2025-02-28 13:28:49 -07:00
parent db3382f38a
commit 5924d28b71
4 changed files with 28 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
# breel
**/*.sw*
/target
**/target
# Godot 4+ specific ignores
.godot/

7
src/rust/Cargo.lock generated Normal file
View File

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "price-is-wrong"
version = "0.1.0"

6
src/rust/Cargo.toml Normal file
View File

@ -0,0 +1,6 @@
[package]
name = "price-is-wrong"
version = "0.1.0"
edition = "2024"
[dependencies]

14
src/rust/src/lib.rs Normal file
View 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);
}
}