Skip to content

Commit

Permalink
DRAFT: Remove ribir_gpu and winit dependencies from ribir_core
Browse files Browse the repository at this point in the history
fixes RibirX#233
Move the dependencies to a new create `ribir_app_winit`
and create abstractions to break up dependencies in ribir_core code.
  • Loading branch information
zoechi committed Mar 6, 2023
1 parent 8b3f532 commit 5475530
Show file tree
Hide file tree
Showing 32 changed files with 2,153 additions and 973 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ members = [
"algo",
"text",
"widgets",
"app_winit",
"ribir",
]
resolver = "2"
Expand Down
20 changes: 20 additions & 0 deletions app_winit/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "ribir_app_winit"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
log = "0.4.8"
ribir_painter = { path = "../painter" }
ribir_core = { path = "../core" }
ribir_gpu = { path = "../gpu" }
winit = "0.28.1"

[dev-dependencies]
ribir_core = { path = "../core", features = ["test-utils"]}

[features]
defautl = ["wgpu_gl"]
wgpu_gl = ["ribir_gpu/wgpu_gl"]
1 change: 1 addition & 0 deletions core/src/application.rs → app_winit/src/application.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::prelude::*;
use std::{collections::HashMap, rc::Rc};
use ribir_core::prelude::{AppContext, Theme};
pub use winit::window::WindowId;
use winit::{
event::{Event, WindowEvent},
Expand Down
Loading

0 comments on commit 5475530

Please sign in to comment.