cargo: init library txcore for shared code between server & client

This commit is contained in:
Muhammad Nauman Raza 2025-02-19 18:27:09 +00:00
parent 682282858c
commit 782874a62a
Signed by untrusted user: devraza
GPG key ID: 91EAD6081011574B
2 changed files with 20 additions and 0 deletions

6
txcore/Cargo.toml Normal file
View file

@ -0,0 +1,6 @@
[package]
name = "txcore"
version = "0.1.0"
edition = "2024"
[dependencies]

14
txcore/src/lib.rs Normal file
View file

@ -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);
}
}