The initial hard rename (255cf7cc) broke because Cargo's [patch] with
`package = libcosmic-yoda` does NOT unify across the transitive graph.
cosmic-files (still upstream) asks for "libcosmic"; patched with a
renamed package it ends up as a separate crate, leading to two copies
of cosmic::Theme/Action with incompatible types.
Soft fork keeps the yoda identity where it counts and stays compatible:
- Cargo name : libcosmic (for patch/unification)
- Version : 1.0.0 (same major as upstream so [patch] semver-accepts it)
- Lib name : cosmic (unchanged)
- Repo : leyoda/libcosmic-yoda on Forgejo (yoda lineage)
- Branch : main (vs upstream master)
Revert parts:
- examples/*/Cargo.toml dep refs back to libcosmic
- i18n/*/libcosmic_yoda.ftl renamed back to libcosmic.ftl
Added:
- Compat stub features: winit = [], x11 = [] — empty so Cargo can satisfy
upstream deps asking for these, but no code is actually gated on them
any more (all removed in Phase 2).
Ungates done to make the Wayland path self-sufficient after winit removal:
- src/lib.rs: pub mod app + pub use Application/ApplicationExt no longer
gated on winit; prelude exports ApplicationExt unconditionally
- src/surface/action.rs: 6 functions had #[cfg(all(wayland, linux, winit))]
triple-gates; simplified to #[cfg(all(wayland, linux))] since winit is
no longer a meaningful gate (wayland is now the only shell)
- 12 standalone #[cfg(feature = "winit")] annotations removed from src/
(their gated code is now always compiled)
cargo check --lib + cargo check in cosmic-yoterm both pass with a single
libcosmic v1.0.0 in the tree.
266 lines
7.3 KiB
TOML
266 lines
7.3 KiB
TOML
[package]
|
|
# NOTE (yoda fork): Cargo package name kept as "libcosmic" — see commit
|
|
# 255cf7cc & its follow-up. Renaming it to "libcosmic-yoda" broke transitive
|
|
# dep unification: cosmic-files (still upstream) asks for "libcosmic" and
|
|
# Cargo's [patch] with `package = "libcosmic-yoda"` does NOT unify across
|
|
# the graph, so two copies of the crate end up in the binary with
|
|
# incompatible types. Yoda identity is kept via:
|
|
# - repo: forgejo leyoda/libcosmic-yoda
|
|
# - branch: main (vs upstream master)
|
|
# - version: 0.1.0-yoda (pre-1.0 marker denotes divergent lineage)
|
|
# - [lib] name stays "cosmic" (unchanged, matches every consumer)
|
|
name = "libcosmic"
|
|
version = "1.0.0"
|
|
edition = "2024"
|
|
rust-version = "1.90"
|
|
|
|
[lib]
|
|
name = "cosmic"
|
|
|
|
[features]
|
|
default = [
|
|
"tokio",
|
|
"a11y",
|
|
"dbus-config",
|
|
"wayland",
|
|
"multi-window",
|
|
]
|
|
advanced-shaping = ["iced/advanced-shaping"]
|
|
# Accessibility support
|
|
a11y = ["iced/a11y", "iced_accessibility"]
|
|
# Enable about widget
|
|
about = []
|
|
# Builds support for animated images
|
|
animated-image = [
|
|
"dep:async-fs",
|
|
"image/gif",
|
|
"image/webp",
|
|
"image/png",
|
|
"tokio?/io-util",
|
|
"tokio?/fs",
|
|
]
|
|
# XXX autosize should not be used on winit windows unless dialogs
|
|
autosize = []
|
|
applet = [
|
|
"autosize",
|
|
"wayland",
|
|
"tokio",
|
|
"cosmic-panel-config",
|
|
"ron",
|
|
"multi-window",
|
|
]
|
|
applet-token = ["applet"]
|
|
# Use the cosmic-settings-daemon for config handling on Linux targets
|
|
dbus-config = []
|
|
# Debug features
|
|
debug = ["iced/debug"]
|
|
# Enables pipewire support in ashpd, if ashpd is enabled
|
|
pipewire = ["ashpd?/pipewire"]
|
|
# Enables process spawning helper
|
|
process = ["dep:libc", "dep:rustix"]
|
|
# Use rfd for file dialogs
|
|
rfd = ["dep:rfd"]
|
|
# Enables desktop files helpers
|
|
desktop = [
|
|
"process",
|
|
"dep:cosmic-settings-config",
|
|
"dep:freedesktop-desktop-entry",
|
|
"dep:image-extras",
|
|
"dep:mime",
|
|
"dep:shlex",
|
|
"tokio?/io-util",
|
|
"tokio?/net",
|
|
]
|
|
# Enables launching desktop files inside systemd scopes
|
|
desktop-systemd-scope = ["desktop", "dep:zbus"]
|
|
# Enables keycode serialization
|
|
serde-keycode = ["iced_core/serde"]
|
|
# Prevents multiple separate process instances.
|
|
single-instance = ["zbus/blocking-api", "ron"]
|
|
# smol async runtime
|
|
smol = ["dep:smol", "iced/smol", "zbus?/async-io", "rfd?/async-std"]
|
|
tokio = [
|
|
"dep:tokio",
|
|
"ashpd?/tokio",
|
|
"iced/tokio",
|
|
"rfd?/tokio",
|
|
"zbus?/tokio",
|
|
"cosmic-config/tokio",
|
|
]
|
|
# Tokio async runtime
|
|
# Wayland window support (yoda fork is Wayland-only; always active in default).
|
|
# We still need iced/winit because pop-os/iced hosts the runtime dispatcher
|
|
# (`iced_winit as shell`) there — the name is a misnomer, it's the same crate
|
|
# that provides both the winit path AND the sctk/cctk wayland path.
|
|
wayland = [
|
|
"ashpd?/wayland",
|
|
"autosize",
|
|
"iced/winit",
|
|
"iced/wayland",
|
|
"iced_winit/wayland",
|
|
"iced_runtime/cctk",
|
|
"iced_winit/cctk",
|
|
"iced_wgpu/cctk",
|
|
"iced/cctk",
|
|
"dep:iced_winit",
|
|
"dep:cctk",
|
|
"surface-message",
|
|
]
|
|
surface-message = []
|
|
# multi-window support
|
|
multi-window = []
|
|
# Render with wgpu
|
|
wgpu = ["iced/wgpu", "iced_wgpu"]
|
|
# Compat stubs — kept empty so upstream deps (cosmic-files, cosmic-text, …)
|
|
# that still ask for `winit` / `x11` features resolve cleanly against the
|
|
# yoda fork. Activating them has no effect: no code is gated on these.
|
|
winit = []
|
|
x11 = []
|
|
# Enables XDG portal integrations
|
|
xdg-portal = ["ashpd"]
|
|
qr_code = ["iced/qr_code"]
|
|
markdown = ["iced/markdown"]
|
|
highlighter = ["iced/highlighter"]
|
|
async-std = [
|
|
"dep:async-std",
|
|
"ashpd?/async-std",
|
|
"rfd?/async-std",
|
|
"zbus?/async-io",
|
|
"iced/async-std",
|
|
]
|
|
|
|
[dependencies]
|
|
apply = "0.3.0"
|
|
ashpd = { version = "0.12.3", default-features = false, optional = true }
|
|
async-fs = { version = "2.2", optional = true }
|
|
async-std = { version = "1.13", optional = true }
|
|
auto_enums = "0.8.8"
|
|
cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-client-toolkit", rev = "160b086", optional = true }
|
|
jiff = "0.2"
|
|
cosmic-config = { path = "cosmic-config" }
|
|
cosmic-settings-config = { git = "https://github.com/pop-os/cosmic-settings-daemon", optional = true }
|
|
# Internationalization
|
|
i18n-embed = { version = "0.16.0", features = [
|
|
"fluent-system",
|
|
"desktop-requester",
|
|
] }
|
|
i18n-embed-fl = "0.10"
|
|
rust-embed = "8.11.0"
|
|
css-color = "0.2.8"
|
|
derive_setters = "0.1.9"
|
|
futures = "0.3"
|
|
image = { version = "0.25.10", default-features = false, features = [
|
|
"ico",
|
|
"jpeg",
|
|
"png",
|
|
] }
|
|
image-extras = { version = "0.1.0", default-features = false, features = [
|
|
"xpm",
|
|
"xbm",
|
|
], optional = true }
|
|
libc = { version = "0.2.183", optional = true }
|
|
log = "0.4"
|
|
mime = { version = "0.3.17", optional = true }
|
|
palette = "0.7.6"
|
|
rfd = { version = "0.16.0", default-features = false, features = [
|
|
"xdg-portal",
|
|
], optional = true }
|
|
rustix = { version = "1.1", features = ["pipe", "process"], optional = true }
|
|
serde = { version = "1.0.228", features = ["derive"] }
|
|
slotmap = "1.1.1"
|
|
smol = { version = "2.0.2", optional = true }
|
|
thiserror = "2.0.18"
|
|
taffy = { version = "0.9.2", features = ["grid"] }
|
|
tokio = { version = "1.50.0", optional = true }
|
|
tracing = "0.1.44"
|
|
unicode-segmentation = "1.12"
|
|
url = "2.5.8"
|
|
zbus = { version = "5.14.0", default-features = false, optional = true }
|
|
float-cmp = "0.10.0"
|
|
|
|
# Enable DBus feature on Linux targets
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
cosmic-config = { path = "cosmic-config", features = ["dbus"] }
|
|
cosmic-settings-daemon = { git = "https://github.com/pop-os/dbus-settings-bindings" }
|
|
zbus = { version = "5.14.0", default-features = false }
|
|
|
|
[target.'cfg(all(unix, not(target_os = "macos")))'.dependencies]
|
|
freedesktop-icons = { package = "cosmic-freedesktop-icons", git = "https://github.com/pop-os/freedesktop-icons" }
|
|
freedesktop-desktop-entry = { version = "0.8.1", optional = true }
|
|
shlex = { version = "1.3.0", optional = true }
|
|
|
|
[target.'cfg(any(not(unix), target_os = "macos"))'.dependencies]
|
|
# Used to embed bundled icons for non-unix platforms.
|
|
phf = { version = "0.13.1", features = ["macros"] }
|
|
|
|
[dependencies.cosmic-theme]
|
|
path = "cosmic-theme"
|
|
|
|
[dependencies.iced]
|
|
path = "./iced"
|
|
default-features = false
|
|
features = [
|
|
"advanced",
|
|
"image-without-codecs",
|
|
"lazy",
|
|
"svg",
|
|
"web-colors",
|
|
"tiny-skia",
|
|
]
|
|
|
|
[dependencies.iced_runtime]
|
|
path = "./iced/runtime"
|
|
|
|
[dependencies.iced_renderer]
|
|
path = "./iced/renderer"
|
|
|
|
[dependencies.iced_core]
|
|
path = "./iced/core"
|
|
features = ["serde"]
|
|
|
|
[dependencies.iced_widget]
|
|
path = "./iced/widget"
|
|
features = ["canvas"]
|
|
|
|
[dependencies.iced_futures]
|
|
path = "./iced/futures"
|
|
|
|
[dependencies.iced_accessibility]
|
|
path = "./iced/accessibility"
|
|
optional = true
|
|
|
|
[dependencies.iced_tiny_skia]
|
|
path = "./iced/tiny_skia"
|
|
|
|
[dependencies.iced_winit]
|
|
path = "./iced/winit"
|
|
optional = true
|
|
|
|
[dependencies.iced_wgpu]
|
|
path = "./iced/wgpu"
|
|
optional = true
|
|
|
|
[dependencies.cosmic-panel-config]
|
|
git = "https://github.com/pop-os/cosmic-panel"
|
|
# path = "../cosmic-panel/cosmic-panel-config"
|
|
optional = true
|
|
|
|
[dependencies.ron]
|
|
version = "0.12"
|
|
optional = true
|
|
|
|
[workspace]
|
|
members = [
|
|
"cosmic-config",
|
|
"cosmic-config-derive",
|
|
"cosmic-theme",
|
|
]
|
|
# examples/* excluded — many depend on the removed winit/x11 features.
|
|
# They will be revisited and adapted in a later phase.
|
|
exclude = ["iced", "examples"]
|
|
|
|
[workspace.dependencies]
|
|
dirs = "6.0.0"
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3.27.0"
|