ashell’s dependencies are managed in Cargo.toml. This chapter covers the key dependencies and why they’re used.
Crate Version Purpose
iced (iced_layershell)Git (v0.6.0) GUI framework with Wayland layer shell support via iced_layershell
The dependency is aliased as iced in Cargo.toml (package = "iced_layershell"). It uses these features:
tokio — Async runtime integration
advanced — Custom widget support
wgpu — GPU-accelerated rendering
tiny-skia — Software rendering fallback
image, svg, canvas — Graphics capabilities
Crate Version Purpose
tokio1 Async runtime for services
tokio-stream0.1 Stream utilities
Crate Version Purpose
hyprlandGit (master) Hyprland IPC client
niri-ipc26.4 Niri IPC client
Crate Version Purpose
zbus5 D-Bus client (BlueZ, NM, UPower, etc.)
libpulse-binding2.28 PulseAudio client library
pipewire0.10 PipeWire integration
wayland-client0.31 Wayland protocol client
wayland-protocols0.32 Wayland protocol definitions
sysinfo0.39 CPU, RAM, disk, network statistics
udev0.9 Device monitoring
Crate Version Purpose
toml1 TOML config file parsing
serde1.0 Serialization/deserialization
serde_json1 JSON parsing (custom modules, compositor IPC, weather)
serde_with3.12 Advanced serde derivation
clap4.5 CLI argument parsing
inotify0.11.1 File change watching
Crate Version Purpose
chrono0.4 Date/time handling
chrono-tz0.10.4 Timezone support
regex1.12.2 Regular expressions (config parsing)
hex_color3 Hex color parsing in config
itertools0.15 Iterator utilities
anyhow1 Error handling
log0.4 Logging facade
flexi_logger0.31 Logging implementation
signal-hook0.4.3 Unix signal handling (SIGUSR1)
reqwest0.13 HTTP client (weather data, media artwork)
url2.5.7 URL parsing
freedesktop-icons0.4 XDG icon lookup
linicon-theme1.2.0 Icon theme resolution
shellexpand3 Tilde/env var expansion in paths
pin-project-lite0.2.16 Pin projection (for throttle stream)
libc0.2.182 System call interfaces
Crate Version Purpose
allsorts0.17 Font parsing and subsetting in build.rs
Three dependencies come from git instead of crates.io:
iced_layershell (aliased as iced) — pinned to tag v0.6.0
hyprland — tracks the master branch
softbuffer — replaced via [patch.crates-io] with a fork (branch wayland-argb) that uses wl_shm Argb8888, so the tiny-skia fallback renderer honors alpha on Wayland (upstream hardcodes Xrgb8888, which the compositor treats as fully opaque). The fork is based on v0.4.8 to match the iced_tiny_skia release iced depends on — rebasing it past 0.4.x will break the patch.
Cargo.lock pins each source to an exact commit, so clones build reproducibly; only an explicit cargo update -p <crate> moves a branch-tracking dependency.
[profile.release]
lto = "thin" # Link-Time Optimization (balances speed vs compile time)
strip = true # Remove debug symbols from binary
opt-level = 3 # Maximum optimization
panic = "abort" # No stack unwinding (smaller binary)
For binary distribution, runtime dependencies are declared in Cargo.toml metadata:
[package.metadata.nfpm]
provides = ["ashell"]
[package.metadata.nfpm.overrides.deb]
depends = ["libxkbcommon0", "libwayland-client0", "libpipewire-0.3-0t64", "libpulse0", "libudev1", "dbus"]
[package.metadata.nfpm.overrides.rpm]
depends = ["libxkbcommon", "libwayland-client", "pipewire-libs", "pulseaudio-libs", "systemd-libs", "dbus"]
Dependencies go under overrides because package names differ per distro
(libxkbcommon0 on Debian/Ubuntu, libxkbcommon on Fedora). cargo-nfpm ignores
depends in the plain [package.metadata.nfpm.deb] / .rpm tables. When adding
a crate that links a new system library, add it to both lists. Check the result
with readelf -d target/release/ashell | grep NEEDED.