diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-07-19 14:31:33 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-07-19 14:38:43 +0900 |
| commit | 6cbd16ed14ac36f8e117937fc2dc73a8a9ddb698 (patch) | |
| tree | 5023ead1735d297149a65f5c4e76e3cc0c761b6d | |
| parent | 53bbb4ff0effb2886c2462d5a2693dae5c9c5ee6 (diff) | |
| download | regulus-6cbd16ed14ac36f8e117937fc2dc73a8a9ddb698.tar.gz regulus-6cbd16ed14ac36f8e117937fc2dc73a8a9ddb698.tar.zst regulus-6cbd16ed14ac36f8e117937fc2dc73a8a9ddb698.zip | |
cargo init
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | Cargo.lock | 7 | ||||
| -rw-r--r-- | Cargo.toml | 6 | ||||
| -rw-r--r-- | src/lib.rs | 14 |
4 files changed, 28 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..f3083ee --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "regulus" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..d284715 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "regulus" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/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); + } +} |
