Skip to content

Commit

Permalink
Adding new library
Browse files Browse the repository at this point in the history
  • Loading branch information
mjovanc committed Nov 19, 2024
1 parent 9bde349 commit 3d7c8fb
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ members = [
"njord",
"njord_derive",
"njord_cli",
"njord_ml",
"njord_examples/sqlite",
"njord_examples/mysql",
"njord_examples/oracle",
Expand Down
6 changes: 6 additions & 0 deletions njord_ml/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "njord_ml"
version = "0.1.0"
edition = "2021"

[dependencies]
14 changes: 14 additions & 0 deletions njord_ml/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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);
}
}

0 comments on commit 3d7c8fb

Please sign in to comment.