From 3458662cfcde3202430d4eb9e41d38a43616363c Mon Sep 17 00:00:00 2001 From: reo Date: Sun, 17 Aug 2025 21:14:59 +0300 Subject: [PATCH] Rename crate folders to remove raidillon prefix --- Cargo.toml | 10 +++++----- {raidillon_assets => assets}/Cargo.toml | 0 {raidillon_assets => assets}/src/lib.rs | 0 {raidillon_assets => assets}/src/model_manager.rs | 0 {raidillon_core => core}/Cargo.lock | 0 {raidillon_core => core}/Cargo.toml | 2 +- {raidillon_core => core}/src/engine.rs | 0 {raidillon_core => core}/src/lib.rs | 0 {raidillon_core => core}/src/scene.rs | 0 {raidillon_core => core}/src/system.rs | 0 game/Cargo.toml | 13 +++++++++++++ {raidillon_game => game}/src/main.rs | 2 +- {raidillon_glium => glium_platform}/Cargo.lock | 0 {raidillon_glium => glium_platform}/Cargo.toml | 6 +++--- {raidillon_glium => glium_platform}/src/assets.rs | 0 .../src/gltf_loader.rs | 0 {raidillon_glium => glium_platform}/src/lib.rs | 0 {raidillon_glium => glium_platform}/src/model.rs | 0 {raidillon_glium => glium_platform}/src/platform.rs | 5 ++++- .../src/render/basic.rs | 0 .../src/render/mod.rs | 0 {raidillon_glium => glium_platform}/src/system.rs | 4 ++-- {raidillon_platform => platform}/Cargo.lock | 0 {raidillon_platform => platform}/Cargo.toml | 4 ++-- {raidillon_platform => platform}/src/context.rs | 0 {raidillon_platform => platform}/src/event.rs | 0 {raidillon_platform => platform}/src/lib.rs | 0 {raidillon_platform => platform}/src/platform.rs | 0 raidillon_game/Cargo.toml | 13 ------------- 29 files changed, 31 insertions(+), 28 deletions(-) rename {raidillon_assets => assets}/Cargo.toml (100%) rename {raidillon_assets => assets}/src/lib.rs (100%) rename {raidillon_assets => assets}/src/model_manager.rs (100%) rename {raidillon_core => core}/Cargo.lock (100%) rename {raidillon_core => core}/Cargo.toml (72%) rename {raidillon_core => core}/src/engine.rs (100%) rename {raidillon_core => core}/src/lib.rs (100%) rename {raidillon_core => core}/src/scene.rs (100%) rename {raidillon_core => core}/src/system.rs (100%) create mode 100644 game/Cargo.toml rename {raidillon_game => game}/src/main.rs (96%) rename {raidillon_glium => glium_platform}/Cargo.lock (100%) rename {raidillon_glium => glium_platform}/Cargo.toml (67%) rename {raidillon_glium => glium_platform}/src/assets.rs (100%) rename {raidillon_glium => glium_platform}/src/gltf_loader.rs (100%) rename {raidillon_glium => glium_platform}/src/lib.rs (100%) rename {raidillon_glium => glium_platform}/src/model.rs (100%) rename {raidillon_glium => glium_platform}/src/platform.rs (94%) rename {raidillon_glium => glium_platform}/src/render/basic.rs (100%) rename {raidillon_glium => glium_platform}/src/render/mod.rs (100%) rename {raidillon_glium => glium_platform}/src/system.rs (87%) rename {raidillon_platform => platform}/Cargo.lock (100%) rename {raidillon_platform => platform}/Cargo.toml (51%) rename {raidillon_platform => platform}/src/context.rs (100%) rename {raidillon_platform => platform}/src/event.rs (100%) rename {raidillon_platform => platform}/src/lib.rs (100%) rename {raidillon_platform => platform}/src/platform.rs (100%) delete mode 100644 raidillon_game/Cargo.toml diff --git a/Cargo.toml b/Cargo.toml index ded884a..2601dec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,8 @@ [workspace] members = [ - "raidillon_core", - "raidillon_glium", - "raidillon_platform", - "raidillon_assets", - "raidillon_game" + "core", + "glium_platform", + "platform", + "assets", + "game" ] diff --git a/raidillon_assets/Cargo.toml b/assets/Cargo.toml similarity index 100% rename from raidillon_assets/Cargo.toml rename to assets/Cargo.toml diff --git a/raidillon_assets/src/lib.rs b/assets/src/lib.rs similarity index 100% rename from raidillon_assets/src/lib.rs rename to assets/src/lib.rs diff --git a/raidillon_assets/src/model_manager.rs b/assets/src/model_manager.rs similarity index 100% rename from raidillon_assets/src/model_manager.rs rename to assets/src/model_manager.rs diff --git a/raidillon_core/Cargo.lock b/core/Cargo.lock similarity index 100% rename from raidillon_core/Cargo.lock rename to core/Cargo.lock diff --git a/raidillon_core/Cargo.toml b/core/Cargo.toml similarity index 72% rename from raidillon_core/Cargo.toml rename to core/Cargo.toml index 2b414ed..4b234a6 100644 --- a/raidillon_core/Cargo.toml +++ b/core/Cargo.toml @@ -6,5 +6,5 @@ edition = "2024" [dependencies] hecs = "0.10.5" indexmap = "2.10.0" -raidillon_assets = { path = "../raidillon_assets" } +raidillon_assets = { path = "../assets" } winit = "0.30.12" diff --git a/raidillon_core/src/engine.rs b/core/src/engine.rs similarity index 100% rename from raidillon_core/src/engine.rs rename to core/src/engine.rs diff --git a/raidillon_core/src/lib.rs b/core/src/lib.rs similarity index 100% rename from raidillon_core/src/lib.rs rename to core/src/lib.rs diff --git a/raidillon_core/src/scene.rs b/core/src/scene.rs similarity index 100% rename from raidillon_core/src/scene.rs rename to core/src/scene.rs diff --git a/raidillon_core/src/system.rs b/core/src/system.rs similarity index 100% rename from raidillon_core/src/system.rs rename to core/src/system.rs diff --git a/game/Cargo.toml b/game/Cargo.toml new file mode 100644 index 0000000..0c76ce4 --- /dev/null +++ b/game/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "raidillon_game" +version = "0.1.0" +edition = "2024" + +[features] +default = ["glium"] +glium = ["raidillon_glium"] + +[dependencies] +raidillon_core = { path = "../core" } +raidillon_platform = { path = "../platform" } +raidillon_glium = { path = "../glium_platform", optional = true } diff --git a/raidillon_game/src/main.rs b/game/src/main.rs similarity index 96% rename from raidillon_game/src/main.rs rename to game/src/main.rs index c4ca0e7..3b201a7 100644 --- a/raidillon_game/src/main.rs +++ b/game/src/main.rs @@ -12,7 +12,7 @@ fn main() { // Set up the scene let main_scene_id = "Main".to_owned(); - let mut main_scene = Scene::new( + let main_scene = Scene::new( main_scene_id.clone(), None, ); diff --git a/raidillon_glium/Cargo.lock b/glium_platform/Cargo.lock similarity index 100% rename from raidillon_glium/Cargo.lock rename to glium_platform/Cargo.lock diff --git a/raidillon_glium/Cargo.toml b/glium_platform/Cargo.toml similarity index 67% rename from raidillon_glium/Cargo.toml rename to glium_platform/Cargo.toml index 8363ef3..aa35243 100644 --- a/raidillon_glium/Cargo.toml +++ b/glium_platform/Cargo.toml @@ -8,8 +8,8 @@ anyhow = "1.0.98" glam = "0.30.5" glium = { version = "0.35.0", features = ["glutin_backend", "simple_window_builder"] } gltf = { version = "1.4.1", features = ["import", "utils", "KHR_texture_transform"] } -raidillon_platform = { path = "../raidillon_platform" } -raidillon_core = { path = "../raidillon_core" } -raidillon_assets = { path = "../raidillon_assets" } +raidillon_platform = { path = "../platform" } +raidillon_core = { path = "../core" } +raidillon_assets = { path = "../assets" } winit = "0.30.12" indexmap = "2.10.0" \ No newline at end of file diff --git a/raidillon_glium/src/assets.rs b/glium_platform/src/assets.rs similarity index 100% rename from raidillon_glium/src/assets.rs rename to glium_platform/src/assets.rs diff --git a/raidillon_glium/src/gltf_loader.rs b/glium_platform/src/gltf_loader.rs similarity index 100% rename from raidillon_glium/src/gltf_loader.rs rename to glium_platform/src/gltf_loader.rs diff --git a/raidillon_glium/src/lib.rs b/glium_platform/src/lib.rs similarity index 100% rename from raidillon_glium/src/lib.rs rename to glium_platform/src/lib.rs diff --git a/raidillon_glium/src/model.rs b/glium_platform/src/model.rs similarity index 100% rename from raidillon_glium/src/model.rs rename to glium_platform/src/model.rs diff --git a/raidillon_glium/src/platform.rs b/glium_platform/src/platform.rs similarity index 94% rename from raidillon_glium/src/platform.rs rename to glium_platform/src/platform.rs index d72b3c3..f9a6eb9 100644 --- a/raidillon_glium/src/platform.rs +++ b/glium_platform/src/platform.rs @@ -52,7 +52,10 @@ impl Platform for GliumPlatform { let _ = &self.event_loop.run(move |event, el| { match event { Event::WindowEvent { event, .. } => match event { - WindowEvent::CloseRequested => {}, + WindowEvent::CloseRequested => { + // TODO: Run uninitialize on renderer and engine + el.exit(); + }, WindowEvent::RedrawRequested => { let mut target = self.display.draw(); target.clear_color(0.0, 0.0, 0.0, 1.0); diff --git a/raidillon_glium/src/render/basic.rs b/glium_platform/src/render/basic.rs similarity index 100% rename from raidillon_glium/src/render/basic.rs rename to glium_platform/src/render/basic.rs diff --git a/raidillon_glium/src/render/mod.rs b/glium_platform/src/render/mod.rs similarity index 100% rename from raidillon_glium/src/render/mod.rs rename to glium_platform/src/render/mod.rs diff --git a/raidillon_glium/src/system.rs b/glium_platform/src/system.rs similarity index 87% rename from raidillon_glium/src/system.rs rename to glium_platform/src/system.rs index a83d79a..03d228f 100644 --- a/raidillon_glium/src/system.rs +++ b/glium_platform/src/system.rs @@ -10,8 +10,8 @@ pub struct RenderingContext<'a> { pub asset_manager: ModelManagerRef, } -/// The internal "rendering system" trait of raidillon_glium. -/// This is unrelated to the main System trait in raidillon_core. +/// The internal "rendering system" trait of glium_platform. +/// This is unrelated to the main System trait in core. pub trait RenderingSystem { fn render(&mut self, ctx: &mut RenderingContext); fn compile_shaders(&mut self) {} diff --git a/raidillon_platform/Cargo.lock b/platform/Cargo.lock similarity index 100% rename from raidillon_platform/Cargo.lock rename to platform/Cargo.lock diff --git a/raidillon_platform/Cargo.toml b/platform/Cargo.toml similarity index 51% rename from raidillon_platform/Cargo.toml rename to platform/Cargo.toml index af05ba3..06d4e12 100644 --- a/raidillon_platform/Cargo.toml +++ b/platform/Cargo.toml @@ -5,5 +5,5 @@ edition = "2024" [dependencies] winit = "0.30.12" -raidillon_core = { path = "../raidillon_core" } -raidillon_assets = { path = "../raidillon_assets" } +raidillon_core = { path = "../core" } +raidillon_assets = { path = "../assets" } diff --git a/raidillon_platform/src/context.rs b/platform/src/context.rs similarity index 100% rename from raidillon_platform/src/context.rs rename to platform/src/context.rs diff --git a/raidillon_platform/src/event.rs b/platform/src/event.rs similarity index 100% rename from raidillon_platform/src/event.rs rename to platform/src/event.rs diff --git a/raidillon_platform/src/lib.rs b/platform/src/lib.rs similarity index 100% rename from raidillon_platform/src/lib.rs rename to platform/src/lib.rs diff --git a/raidillon_platform/src/platform.rs b/platform/src/platform.rs similarity index 100% rename from raidillon_platform/src/platform.rs rename to platform/src/platform.rs diff --git a/raidillon_game/Cargo.toml b/raidillon_game/Cargo.toml deleted file mode 100644 index 2862874..0000000 --- a/raidillon_game/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "raidillon_game" -version = "0.1.0" -edition = "2024" - -[features] -default = ["glium"] -glium = ["raidillon_glium"] - -[dependencies] -raidillon_core = { path = "../raidillon_core" } -raidillon_platform = { path = "../raidillon_platform" } -raidillon_glium = { path = "../raidillon_glium", optional = true }