Skip to content

Commit

Permalink
move serde behind feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
panekj committed Nov 29, 2024
1 parent 5a61bb0 commit 5230af2
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 20 deletions.
46 changes: 34 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
[workspace]
resolver = "2"
members = ["renderer", "vello", "vger", "tiny_skia", "reactive", "editor-core", "examples/*"]
members = [
"renderer",
"vello",
"vger",
"tiny_skia",
"reactive",
"editor-core",
"examples/*",
]

[workspace.package]
license = "MIT"
Expand All @@ -18,9 +26,9 @@ rust-version = "1.80"
license.workspace = true

[workspace.dependencies]
peniko = { version = "0.2.0", features = ["serde"] }
serde = "1.0"
lapce-xi-rope = { version = "0.3.2", features = ["serde"] }
peniko = { version = "0.2.0" }
serde = { version = "1.0" }
lapce-xi-rope = { version = "0.3.2" }
strum = { version = "0.26.2", features = ["derive"] }
strum_macros = { version = "0.26.2" }
# Image format features are defined via new features
Expand All @@ -42,7 +50,7 @@ smallvec = "1.10.0"
educe = "0.5.11"
taffy = { version = "0.4", features = ["grid"] }
rfd = { version = "0.14.0", default-features = false, features = [
"xdg-portal",
"xdg-portal",
], optional = true }
tokio = { version = "1", features = ["sync", "rt"], optional = true }
raw-window-handle = { workspace = true }
Expand All @@ -57,13 +65,16 @@ strum_macros = { workspace = true, optional = true }
# TODO: once https://github.com/rust-lang/rust/issues/65991 is stabilized we don't need this
downcast-rs = { version = "1.2.0", optional = true }
floem_renderer = { path = "renderer", version = "0.2.0" }
floem_vello_renderer ={ path = "vello", version = "0.2.0", optional = true}
floem_vger_renderer ={ path = "vger", version = "0.2.0", optional = true}
floem_vello_renderer = { path = "vello", version = "0.2.0", optional = true }
floem_vger_renderer = { path = "vger", version = "0.2.0", optional = true }
floem_tiny_skia_renderer = { path = "tiny_skia", version = "0.2.0" }
floem_reactive = { path = "reactive", version = "0.2.0" }
floem-winit = { version = "0.29.5", features = ["rwh_05"] }
floem-editor-core = { path = "editor-core", version = "0.2.0", optional = true }
copypasta = { version = "0.10.0", default-features = false, features = ["wayland", "x11"] }
copypasta = { version = "0.10.0", default-features = false, features = [
"wayland",
"x11",
] }
parking_lot = { workspace = true }
image = { workspace = true }
im = { workspace = true }
Expand All @@ -84,10 +95,21 @@ default = ["editor", "default-image-formats", "vger"]
vello = ["dep:floem_vello_renderer"]
vger = ["dep:floem_vger_renderer"]

# TODO: this is only winit and the editor serde, there are other dependencies that still depend on
# serde
serde = ["floem-winit/serde", "dep:serde"]
editor = ["floem-editor-core", "dep:lapce-xi-rope", "dep:strum", "dep:strum_macros", "dep:downcast-rs"]
serde = [
"dep:serde",
"floem-winit/serde",
"peniko/serde",
"lapce-xi-rope/serde",
"smallvec/serde",
]

editor = [
"floem-editor-core",
"dep:lapce-xi-rope",
"dep:strum",
"dep:strum_macros",
"dep:downcast-rs",
]

# Image support
# From: https://github.com/image-rs/image/blob/main/Cargo.toml
Expand Down
2 changes: 1 addition & 1 deletion examples/files/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ edition = "2021"

[dependencies]
im.workspace = true
floem = { path = "../.." , features = ["rfd-async-std"] }
floem = { path = "../..", features = ["rfd-async-std"] }
2 changes: 1 addition & 1 deletion examples/syntax-editor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ edition = "2021"
im.workspace = true
floem = { path = "../..", features = ["editor"] }
syntect = "5.2.0"
lazy_static = "1.4.0"
lazy_static = "1.4.0"
7 changes: 5 additions & 2 deletions examples/todo-complex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ edition = "2021"

[dependencies]
confy = "0.6.1"
floem = { path = "../..", features = ["serde", "vello"], default-features = false }
floem = { path = "../..", features = [
"serde",
"vello",
], default-features = false }
im.workspace = true
rusqlite = { version = "0.32.1", features = ["bundled"] }
serde = {workspace = true}
serde = { workspace = true }
# serde = { version = "1.0.210", features = ["derive"] }
2 changes: 1 addition & 1 deletion examples/view-transition/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ edition = "2021"

[dependencies]
im.workspace = true
floem = { path = "../..", features = ["vello"], default-features = false}
floem = { path = "../..", features = ["vello"], default-features = false }
2 changes: 1 addition & 1 deletion examples/widget-gallery/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ edition = "2021"

[dependencies]
im.workspace = true
floem = { path = "../.." , features = ["rfd-async-std"] }
floem = { path = "../..", features = ["rfd-async-std"] }
strum = { version = "0.25.0", features = ["derive"] }
files = { path = "../files/" }
2 changes: 1 addition & 1 deletion examples/window-icon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ edition = "2021"
im.workspace = true
floem = { path = "../.." }
image = "0.25"
nsvg = "0.5"
nsvg = "0.5"
2 changes: 1 addition & 1 deletion vger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ wgpu = { workspace = true }
futures = "0.3.26"
anyhow = "1.0.69"
swash = "0.1.8"
floem-vger-rs = { version = "0.3.1", package = "floem-vger"}
floem-vger-rs = { version = "0.3.1", package = "floem-vger" }
floem_renderer = { path = "../renderer", version = "0.2.0" }

0 comments on commit 5230af2

Please sign in to comment.