Skip to content

Commit cf97029

Browse files
committed
Create sysd crate with initial implementation
This commit introduces a new Rust crate named "sysd" with a basic implementation that includes a function to add two unsigned 64-bit integers. Additionally, a test is provided to verify the functionality of the add function. The crate's configuration is defined in Cargo.toml, establishing its name, version, and edition.
1 parent ea72023 commit cf97029

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

crates/sysd/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "sysd"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]

crates/sysd/src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
pub fn add(left: u64, right: u64) -> u64 {
2+
left + right
3+
}
4+
5+
#[cfg(test)]
6+
mod tests {
7+
use super::*;
8+
9+
#[test]
10+
fn it_works() {
11+
let result = add(2, 2);
12+
assert_eq!(result, 4);
13+
}
14+
}

0 commit comments

Comments
 (0)