From 5f4c49b3072ee298d253319752ea6dad5fb965df Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 14 Nov 2024 19:43:47 +0100 Subject: [PATCH 1/3] feat: added feature configuration to toml --- build/rust/Cargo.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build/rust/Cargo.toml b/build/rust/Cargo.toml index 39cf4fc..1d05111 100644 --- a/build/rust/Cargo.toml +++ b/build/rust/Cargo.toml @@ -21,4 +21,10 @@ tonic-build = "0.12.1" [lib] name = "tucana_internal" -path = "src/lib.rs" \ No newline at end of file +path = "src/lib.rs" + +[features] +shared = [] +aquila = ["shared"] +sagittarius = ["shared"] +all = ["aquila", "sagittarius"] \ No newline at end of file From 597361f57e9440182eeed46021b7a55b0ededdfd Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 14 Nov 2024 19:43:58 +0100 Subject: [PATCH 2/3] feat: added feature attr. --- build/rust/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/rust/src/lib.rs b/build/rust/src/lib.rs index 11bb7d5..06533dd 100644 --- a/build/rust/src/lib.rs +++ b/build/rust/src/lib.rs @@ -1,11 +1,14 @@ +#[cfg(feature = "sagittarius")] pub mod sagittarius { include!("generated/sagittarius.rs"); } +#[cfg(feature = "aquila")] pub mod aquila { include!("generated/aquila.rs"); } +#[cfg(feature = "shared")] pub mod shared { include!("generated/shared.rs"); } \ No newline at end of file From 1b67048beb67cf45fbdc70f7a666b2694d17a183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raphael=20G=C3=B6tz?= <52959657+raphael-goetz@users.noreply.github.com> Date: Tue, 19 Nov 2024 06:26:56 +0100 Subject: [PATCH 3/3] Update Cargo.toml --- build/rust/Cargo.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/rust/Cargo.toml b/build/rust/Cargo.toml index 1d05111..6a3b27b 100644 --- a/build/rust/Cargo.toml +++ b/build/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] version = "0.0.0" -name = "tucana-internal" +name = "tucana" edition = "2021" description = "The rust crate for the internal gRPC communication of Code0" repository = "https://github.com/code0-tech/tucana" @@ -20,11 +20,11 @@ serde_json = "1.0.120" tonic-build = "0.12.1" [lib] -name = "tucana_internal" +name = "tucana" path = "src/lib.rs" [features] shared = [] aquila = ["shared"] sagittarius = ["shared"] -all = ["aquila", "sagittarius"] \ No newline at end of file +all = ["aquila", "sagittarius"]