diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 5a5258f3..7897eb01 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -6,20 +6,26 @@ on:
- master
pull_request:
+
jobs:
format:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
steps:
- name: Checkout sources
- uses: actions/checkout@v6
+ uses: actions/checkout@v3
- name: Rust toolchain
- uses: actions-rust-lang/setup-rust-toolchain@v1
+ uses: dtolnay/rust-toolchain@stable
with:
- toolchain: nightly
components: rustfmt
- rustflags: ""
+ - name: Cargo cache
+ uses: actions/cache@v3
+ with:
+ path: |
+ ~/.cargo/registry
+ ~/.cargo/git
+ key: ${{ runner.os }}-cargo-rust_stable-${{ hashFiles('**/Cargo.toml') }}
- name: Format
- run: cargo +nightly fmt -- --check
+ run: cargo fmt -- --check
tests:
needs:
@@ -28,28 +34,38 @@ jobs:
fail-fast: false
matrix:
test_args:
- - --no-default-features --features "" # for cosmic-comp, don't remove!
- - --no-default-features --features "winit_debug"
- - --no-default-features --features "winit_tokio"
- - --no-default-features --features "winit"
- - --no-default-features --features "winit_wgpu"
- - --no-default-features --features "wayland"
- - --no-default-features --features "applet"
- - --no-default-features --features "desktop,smol"
- - --no-default-features --features "desktop,tokio"
- - -p cosmic-theme
- runs-on: ubuntu-latest
+ - --no-default-features --features "" # for cosmic-comp, don't remove!
+ - --no-default-features --features "winit_debug"
+ - --no-default-features --features "winit_tokio"
+ - --no-default-features --features "winit"
+ - --no-default-features --features "winit_wgpu"
+ - --no-default-features --features "wayland"
+ - --no-default-features --features "applet"
+ - --no-default-features --features "desktop,smol"
+ - --no-default-features --features "desktop,tokio"
+ - -p cosmic-theme
+ runs-on: ubuntu-22.04
steps:
- name: Checkout sources
- uses: actions/checkout@v6
+ uses: actions/checkout@v3
with:
submodules: recursive
+ - name: Get date for registry cache
+ id: date
+ run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
+ - name: Cargo registry cache
+ uses: actions/cache@v3
+ with:
+ path: |
+ ~/.cargo/registry/index
+ ~/.cargo/registry/cache
+ ~/.cargo/git
+ key: ${{ runner.os }}-cargo-registry-${{ steps.date.outputs.date }}
+ restore-keys: ${{ runner.os }}-cargo-registry-
- name: System dependencies
run: sudo apt-get update; sudo apt-get install -y libxkbcommon-dev libwayland-dev
- name: Rust toolchain
- uses: actions-rust-lang/setup-rust-toolchain@v1
- with:
- rustflags: ""
+ uses: dtolnay/rust-toolchain@stable
- name: Test features
run: cargo test ${{ matrix.test_args }} -- --test-threads=1
env:
@@ -66,18 +82,28 @@ jobs:
- "open-dialog"
- "context-menu"
- "nav-context"
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
steps:
- name: Checkout sources
- uses: actions/checkout@v6
+ uses: actions/checkout@v3
with:
submodules: recursive
+ - name: Get date for registry cache
+ id: date
+ run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
+ - name: Cargo registry cache
+ uses: actions/cache@v3
+ with:
+ path: |
+ ~/.cargo/registry/index
+ ~/.cargo/registry/cache
+ ~/.cargo/git
+ key: ${{ runner.os }}-cargo-registry-${{ steps.date.outputs.date }}
+ restore-keys: ${{ runner.os }}-cargo-registry-
- name: System dependencies
run: sudo apt-get update; sudo apt-get install -y libxkbcommon-dev libwayland-dev
- name: Rust toolchain
- uses: actions-rust-lang/setup-rust-toolchain@v1
- with:
- rustflags: ""
+ uses: dtolnay/rust-toolchain@stable
- name: Check example
run: cargo check -p "${{ matrix.examples }}"
env:
diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml
index e51c552f..3e3a042e 100644
--- a/.github/workflows/pages.yml
+++ b/.github/workflows/pages.yml
@@ -11,26 +11,25 @@ jobs:
steps:
- name: Checkout sources
- uses: actions/checkout@v6
+ uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Rust nightly
- uses: actions-rust-lang/setup-rust-toolchain@v1
+ uses: dtolnay/rust-toolchain@master
with:
- toolchain: nightly-2026-04-27
- rustflags: ""
+ toolchain: nightly-2025-07-31
- name: System dependencies
run: sudo apt-get update; sudo apt-get install -y libxkbcommon-dev libwayland-dev
- name: Build documentation
run: |
RUSTDOCFLAGS="--cfg docsrs" \
- cargo +nightly-2026-04-27 doc --no-deps \
+ cargo +nightly-2025-07-31 doc --no-deps \
-p cosmic-client-toolkit \
-p cosmic-protocols \
-p libcosmic \
--verbose --features tokio,winit,wayland,desktop,single-instance,applet,xdg-portal,multi-window
- name: Deploy documentation
- uses: peaceiris/actions-gh-pages@v4
+ uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc
diff --git a/.zed/settings.json b/.zed/settings.json
deleted file mode 100644
index 2cc7b98d..00000000
--- a/.zed/settings.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "format_on_save": "on",
- "lsp": {
- "rust-analyzer": {
- "initialization_options": {
- "check": {
- "command": "clippy",
- },
- "rustfmt": {
- "extraArgs": ["+nightly"],
- },
- },
- },
- },
-}
diff --git a/Cargo.toml b/Cargo.toml
index 9948711a..d73da2dc 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,23 +1,20 @@
[package]
-# Yoda fork: hard-renamed. Every consumer (leyoda/cosmic-files fork + each
-# leyoda/cosmic-* app) depends directly on `libcosmic-yoda` by path, bypassing
-# pop-os/libcosmic entirely. No [patch] shenanigans needed — transitive deps
-# that used to ask for `libcosmic` are replaced by deps on our forks that ask
-# for `libcosmic-yoda`.
-name = "libcosmic-yoda"
-version = "0.1.0-yoda.2"
+name = "libcosmic"
+version = "1.0.0"
edition = "2024"
-rust-version = "1.93"
+rust-version = "1.90"
[lib]
name = "cosmic"
[features]
default = [
+ "winit",
"tokio",
"a11y",
"dbus-config",
- "wayland",
+ "x11",
+ "iced-wayland",
"multi-window",
]
advanced-shaping = ["iced/advanced-shaping"]
@@ -38,6 +35,7 @@ animated-image = [
autosize = []
applet = [
"autosize",
+ "winit",
"wayland",
"tokio",
"cosmic-panel-config",
@@ -83,34 +81,32 @@ 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 = [
+# Wayland window support
+iced-wayland = [
"ashpd?/wayland",
"autosize",
- "iced/winit",
"iced/wayland",
"iced_winit/wayland",
+ "surface-message",
+]
+wayland = [
+ "iced-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 = []
+# X11 window support via winit
+winit = ["iced/winit", "iced_winit"]
+winit_debug = ["winit", "debug"]
+winit_tokio = ["winit", "tokio"]
+winit_wgpu = ["winit", "wgpu"]
# Enables XDG portal integrations
xdg-portal = ["ashpd"]
qr_code = ["iced/qr_code"]
@@ -123,17 +119,18 @@ async-std = [
"zbus?/async-io",
"iced/async-std",
]
+x11 = ["iced/x11", "iced_winit/x11"]
[dependencies]
apply = "0.3.0"
ashpd = { version = "0.12.3", default-features = false, optional = true }
async-fs = { version = "2.2", optional = true }
-async-std = { workspace = true, optional = true }
+async-std = { version = "1.13", optional = true }
auto_enums = "0.8.8"
-cctk = { path = "../cosmic-protocols/client-toolkit", package = "cosmic-client-toolkit", optional = true }
+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 = { path = "../cosmic-settings-daemon/config", optional = true }
+cosmic-settings-config = { git = "https://github.com/pop-os/cosmic-settings-daemon", optional = true }
# Internationalization
i18n-embed = { version = "0.16.0", features = [
"fluent-system",
@@ -153,36 +150,34 @@ image-extras = { version = "0.1.0", default-features = false, features = [
"xpm",
"xbm",
], optional = true }
-libc = { version = "0.2.186", optional = true }
+libc = { version = "0.2.183", optional = true }
log = "0.4"
mime = { version = "0.3.17", optional = true }
-palette.workspace = 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 = { workspace = true, features = ["derive"] }
+serde = { version = "1.0.228", features = ["derive"] }
slotmap = "1.1.1"
smol = { version = "2.0.2", optional = true }
-thiserror.workspace = true
+thiserror = "2.0.18"
taffy = { version = "0.9.2", features = ["grid"] }
-tokio = { workspace = true, optional = true }
-tracing.workspace = true
-unicode-segmentation = "1.13"
+tokio = { version = "1.50.0", optional = true }
+tracing = "0.1.44"
+unicode-segmentation = "1.12"
url = "2.5.8"
-zbus = { workspace = true, optional = true }
+zbus = { version = "5.14.0", default-features = false, optional = true }
float-cmp = "0.10.0"
-ron = { workspace = true, optional = true }
-enumflags2 = "0.7.12"
# Enable DBus feature on Linux targets
[target.'cfg(target_os = "linux")'.dependencies]
cosmic-config = { path = "cosmic-config", features = ["dbus"] }
-cosmic-settings-daemon = { path = "../dbus-settings-bindings/cosmic-settings-daemon" }
+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", path = "../cosmic-freedesktop-icons" }
+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 }
@@ -228,77 +223,35 @@ optional = true
[dependencies.iced_tiny_skia]
path = "./iced/tiny_skia"
-# Yoda: drop the x11 default → softbuffer no longer pulls tiny-xlib/x11-dl/etc.
-default-features = false
-features = ["wayland"]
[dependencies.iced_winit]
path = "./iced/winit"
optional = true
-# Yoda: drop the x11 default → winit won't pull winit-x11/tiny-xlib/x11-dl.
-# Keep wayland + wayland-dlopen (default behaviour minus x11).
-default-features = false
-features = ["wayland", "wayland-dlopen"]
[dependencies.iced_wgpu]
path = "./iced/wgpu"
optional = true
[dependencies.cosmic-panel-config]
-path = "../cosmic-panel/cosmic-panel-config"
+git = "https://github.com/pop-os/cosmic-panel"
+# path = "../cosmic-panel/cosmic-panel-config"
optional = true
-[patch.'https://github.com/pop-os/freedesktop-icons']
-cosmic-freedesktop-icons = { path = "../cosmic-freedesktop-icons" }
-
-[patch.'https://github.com/pop-os/softbuffer']
-softbuffer = { path = "../softbuffer" }
-
-[patch.'https://github.com/pop-os/smithay-clipboard']
-smithay-clipboard = { path = "../smithay-clipboard" }
-
-[patch.'https://github.com/pop-os/winit.git']
-dpi = { path = "../winit/dpi" }
-winit = { path = "../winit/winit" }
-winit-android = { path = "../winit/winit-android" }
-winit-appkit = { path = "../winit/winit-appkit" }
-winit-common = { path = "../winit/winit-common" }
-winit-core = { path = "../winit/winit-core" }
-winit-orbital = { path = "../winit/winit-orbital" }
-winit-uikit = { path = "../winit/winit-uikit" }
-winit-wayland = { path = "../winit/winit-wayland" }
-winit-web = { path = "../winit/winit-web" }
-winit-win32 = { path = "../winit/winit-win32" }
-winit-x11 = { path = "../winit/winit-x11" }
+[dependencies.ron]
+version = "0.12"
+optional = true
[workspace]
members = [
"cosmic-config",
"cosmic-config-derive",
"cosmic-theme",
+ "examples/*",
]
-# examples/* excluded — many depend on the removed winit/x11 features.
-# They will be revisited and adapted in a later phase.
-exclude = ["iced", "examples"]
+exclude = ["iced"]
[workspace.dependencies]
-async-std = "1.13"
-dirs = "6.0"
-palette = "0.7"
-ron = "0.12"
-serde = "1.0"
-thiserror = "2.0"
-tracing = "0.1"
-tokio = "1.52"
-zbus = { version = "5.15", default-features = false }
-
-# Speed up snapshot diffing in cosmic-theme tests. Cargo silently ignores
-# [profile.*] blocks in non-root manifests, so this lives at the
-# workspace root.
-[profile.dev.package.insta]
-opt-level = 3
-[profile.dev.package.similar]
-opt-level = 3
+dirs = "6.0.0"
[dev-dependencies]
tempfile = "3.27.0"
diff --git a/README.md b/README.md
index 698316db..23da97bc 100644
--- a/README.md
+++ b/README.md
@@ -20,24 +20,6 @@ While libcosmic is written entirely in Rust, some of its dependencies may requir
sudo apt install cargo cmake just libexpat1-dev libfontconfig-dev libfreetype-dev libxkbcommon-dev pkgconf
```
-## Made-for-COSMIC Flatpak IDs
-
-To identify a project as a COSMIC Application, add `com.system76.CosmicApplication` to the provides section of the project's metainfo.
-
-```xml
-
- com.system76.CosmicApplication
-
-```
-
-For COSMIC Applets, use `com.system76.CosmicApplet`.
-
-```xml
-
- com.system76.CosmicApplet
-
-```
-
## Examples
Some examples are included in the [examples](./examples) directory to to kickstart your
diff --git a/cosmic-config-derive/src/lib.rs b/cosmic-config-derive/src/lib.rs
index b49cf447..cc19a91e 100644
--- a/cosmic-config-derive/src/lib.rs
+++ b/cosmic-config-derive/src/lib.rs
@@ -1,32 +1,17 @@
use proc_macro::TokenStream;
use quote::quote;
-use syn;
+use syn::{self};
-#[proc_macro_derive(CosmicConfigEntry, attributes(version, id, cosmic_config_entry))]
+#[proc_macro_derive(CosmicConfigEntry, attributes(version, id))]
pub fn cosmic_config_entry_derive(input: TokenStream) -> TokenStream {
+ // Construct a representation of Rust code as a syntax tree
+ // that we can manipulate
let ast = syn::parse(input).unwrap();
+
+ // Build the trait implementation
impl_cosmic_config_entry_macro(&ast)
}
-fn get_cosmic_config_attrs(field: &syn::Field) -> Result