Initialized Rust project for emulation library

This commit is contained in:
Jan-Peter von Hunnius 2024-10-22 11:18:48 +02:00
commit 4ddb4a060f
2 changed files with 20 additions and 0 deletions

6
Cargo.toml Normal file
View file

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

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