summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicha White <botahamec@outlook.com>2023-09-27 09:37:44 -0400
committerMicha White <botahamec@outlook.com>2023-09-27 09:37:44 -0400
commit89a1d6b488f83d121e55d8a6c08efe01649bb692 (patch)
tree79cae2a2aa553ee2e4d70c305d28dbfc6cc198c9
parent1b379403ab971e188483df5d580c39695db7f44a (diff)
Create a pdn crate
-rw-r--r--Cargo.toml4
-rw-r--r--pdn/Cargo.toml8
-rw-r--r--pdn/src/lib.rs14
3 files changed, 25 insertions, 1 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 6907ca9..7c1c288 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,9 @@
[workspace]
+resolver = "2"
members = [
- "model",
"ai",
+ "model",
+ "pdn",
"ui"
]
diff --git a/pdn/Cargo.toml b/pdn/Cargo.toml
new file mode 100644
index 0000000..1ed6d4b
--- /dev/null
+++ b/pdn/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "pdn"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
diff --git a/pdn/src/lib.rs b/pdn/src/lib.rs
new file mode 100644
index 0000000..06d268d
--- /dev/null
+++ b/pdn/src/lib.rs
@@ -0,0 +1,14 @@
+pub fn add(left: usize, right: usize) -> usize {
+ left + right
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn it_works() {
+ let result = add(2, 2);
+ assert_eq!(result, 4);
+ }
+}