aboutsummaryrefslogtreecommitdiffstats
path: root/py_bindings
diff options
context:
space:
mode:
Diffstat (limited to 'py_bindings')
-rw-r--r--py_bindings/Cargo.toml11
-rw-r--r--py_bindings/src/lib.rs16
2 files changed, 27 insertions, 0 deletions
diff --git a/py_bindings/Cargo.toml b/py_bindings/Cargo.toml
new file mode 100644
index 0000000..2f7a83f
--- /dev/null
+++ b/py_bindings/Cargo.toml
@@ -0,0 +1,11 @@
+[package]
+name = "py_bindings"
+version = "0.1.0"
+edition = "2021"
+
+[lib]
+crate-type = ["lib"]
+
+[dependencies]
+log_db = { path = "../log_db" }
+pyo3 = "0.22.3"
diff --git a/py_bindings/src/lib.rs b/py_bindings/src/lib.rs
new file mode 100644
index 0000000..abee9f2
--- /dev/null
+++ b/py_bindings/src/lib.rs
@@ -0,0 +1,16 @@
+use log_db::*;
+
+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);
+ }
+}