feat: add codegen lib

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-09-24 14:02:01 +02:00
parent 09dfa6c2e3
commit 207a6f5c44
6 changed files with 118 additions and 66 deletions

View File

@@ -0,0 +1,14 @@
[package]
name = "crunch-codegen"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
crunch-traits.workspace = true
anyhow.workspace = true
tracing.workspace = true
tokio.workspace = true
async-trait.workspace = true

View File

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