diff --git a/crates/semantics/Cargo.toml b/crates/semantics/Cargo.toml new file mode 100644 index 0000000..e324f76 --- /dev/null +++ b/crates/semantics/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "folidity-semantics" +authors.workspace = true +categories.workspace = true +edition.workspace = true +homepage.workspace = true +keywords.workspace = true +license.workspace = true +repository.workspace = true +version.workspace = true + + +[dependencies] diff --git a/crates/semantics/src/lib.rs b/crates/semantics/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/crates/semantics/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); + } +}