From 3412eb939518d5fe7b6d32788a2bcbf13703af48 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Thu, 18 Jul 2024 19:12:58 +0200 Subject: [PATCH] executor (poc): init proof of concept executor crate --- Cargo.lock | 4 ++++ Cargo.toml | 3 ++- crates/executor-poc/Cargo.toml | 9 +++++++++ crates/executor-poc/src/lib.rs | 14 ++++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 crates/executor-poc/Cargo.toml create mode 100644 crates/executor-poc/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index cc6fd8b..40d5db7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -426,6 +426,10 @@ dependencies = [ "serde", ] +[[package]] +name = "executor-poc" +version = "0.1.0" + [[package]] name = "exr" version = "1.72.0" diff --git a/Cargo.toml b/Cargo.toml index 83becd3..6b774ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,8 @@ members = [ "crates/ir", "crates/lang", "crates/svg-filters", - "crates/prowocessing", + "crates/prowocessing", + "crates/executor-poc", ] resolver = "2" diff --git a/crates/executor-poc/Cargo.toml b/crates/executor-poc/Cargo.toml new file mode 100644 index 0000000..5b0954f --- /dev/null +++ b/crates/executor-poc/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "executor-poc" +version = "0.1.0" +edition = "2021" + +[dependencies] + +[lints] +workspace = true diff --git a/crates/executor-poc/src/lib.rs b/crates/executor-poc/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/crates/executor-poc/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); + } +}