From b13b3f6e13f9ac9fe7fee0b5a81b026f411f0301 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 3 May 2026 20:31:00 +0200 Subject: build: make workspace members inherit other members as dependencies --- Cargo.toml | 10 +++++++++- ecs/Cargo.toml | 4 ++-- engine/Cargo.toml | 8 ++++---- opengl-bindings/Cargo.toml | 2 +- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index be3aa8a..98b5502 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,15 @@ version = "0.1.0" edition = "2021" [workspace] -members = ["engine", "engine-macros", "ecs", "ecs-macros", "util-macros", "opengl-bindings"] +members = ["engine*", "ecs*", "util-macros", "opengl-bindings"] + +[workspace.dependencies] +engine = { path = "engine" } +engine-macros = { path = "engine-macros" } +ecs = { path = "ecs" } +ecs-macros = { path = "ecs-macros" } +util-macros= { path = "util-macros" } +opengl-bindings = { path = "opengl-bindings" } [dependencies] engine = { path = "./engine" } diff --git a/ecs/Cargo.toml b/ecs/Cargo.toml index 5ea9fc7..31fa169 100644 --- a/ecs/Cargo.toml +++ b/ecs/Cargo.toml @@ -13,8 +13,8 @@ thiserror = "1.0.49" tracing = "0.1.39" hashbrown = "0.15.2" parking_lot = "0.12.3" -ecs-macros = { path = "../ecs-macros" } -util-macros = { path = "../util-macros" } +ecs-macros = { workspace = true } +util-macros = { workspace = true } vizoxide = { version = "1.0.5", optional = true } [dev-dependencies.criterion] diff --git a/engine/Cargo.toml b/engine/Cargo.toml index 424d09b..5fd8219 100644 --- a/engine/Cargo.toml +++ b/engine/Cargo.toml @@ -15,10 +15,10 @@ parking_lot = "0.12.3" crossbeam-channel = "0.5.15" safer-ffi = "0.1.13" nu-ansi-term = "0.46.0" -ecs = { path = "../ecs" } -util-macros = { path = "../util-macros" } -opengl-bindings = { path = "../opengl-bindings" } -engine-macros = { path = "../engine-macros" } +ecs = { workspace = true } +util-macros = { workspace = true } +opengl-bindings = { workspace = true } +engine-macros = { workspace = true } [dependencies.winit] version = "0.30.11" diff --git a/opengl-bindings/Cargo.toml b/opengl-bindings/Cargo.toml index ae51a34..c08b94a 100644 --- a/opengl-bindings/Cargo.toml +++ b/opengl-bindings/Cargo.toml @@ -8,7 +8,7 @@ glutin = "0.32.3" thiserror = "1.0.49" safer-ffi = "0.1.13" bitflags = "2.4.0" -util-macros = { path = "../util-macros" } +util-macros = { workspace = true } [build-dependencies] gl_generator = "=0.14.0" -- cgit v1.2.3-18-g5258