Compare commits

..
Author SHA1 Message Date
Aleksandr Bogomiakov 66206544b0 Remove the tray dependency on libxdo
The Linux tray is built on Ubuntu and reused in Debian and Arch packages.
Its default tray-icon feature pulls in libxdo through muda, tying the binary
to the builder's libxdo SONAME. Arch now supplies libxdo.so.4 while existing
release binaries can require libxdo.so.3.

Disable tray-icon default features: libxdo only supports predefined clipboard
menu actions, while our tray uses Open, Quit and a separator. Keep GTK support.
Regenerate Cargo.lock without upgrading other packages, and remove libxdo
build/runtime dependencies from both release workflows, Debian/Arch packaging
and Nix. Update the Arch installation notes.

Clarify that static Linux CLI binaries are release artifacts built for musl;
ordinary host-target Cargo builds on glibc Linux are dynamic. Document the
existing musl build command and its output path. Both release workflows still
package the musl tsng independently of the GNU tray. No protocol, persistent
state, crate version or release tag changes.

Validation on macOS:
- cargo fmt --all -- --check
- cargo clippy --locked --workspace --all-targets -- -D warnings
- cargo test --locked --workspace --all-targets: 532 passed, 2 ignored
- bash -n dist/arch/build-pkg.sh dist/deb/build-deb.sh
- Linux-target Cargo dependency graph retains GTK and contains no libxdo;
  resolved metadata contains neither libxdo nor libxdo-sys
- git diff --check

Initial offline resolution lacked smoltcp and sandboxed registry access failed;
resolution succeeded with approved network access. The first sandboxed test
run failed when child agents exited before readiness; the full run outside
the sandbox passed. Linux release binaries, native GUI startup, packages and
Nix builds were not run locally; CI/release execution is left to the user.
2026-11-16 12:55:34 +00:00
9 changed files with 22 additions and 39 deletions

No files matched your search

+1 -1
View File
@@ -127,7 +127,7 @@ jobs:
# (x86_64 only) against the runner's glibc.
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
libgtk-3-dev libayatana-appindicator3-dev
cargo build --release --locked \
--target "${{ matrix.gnu_target }}" --bin tsunagi-tray
else
+1 -1
View File
@@ -129,7 +129,7 @@ jobs:
# (x86_64 only) against the runner's glibc.
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
libgtk-3-dev libayatana-appindicator3-dev
cargo build --release --locked \
--target "${{ matrix.gnu_target }}" --bin tsunagi-tray
else
Generated
-30
View File
@@ -3253,25 +3253,6 @@ dependencies = [
"vcpkg",
]
[[package]]
name = "libxdo"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00333b8756a3d28e78def82067a377de7fa61b24909000aeaa2b446a948d14db"
dependencies = [
"libxdo-sys",
]
[[package]]
name = "libxdo-sys"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db23b9e7e2b7831bbd8aac0bbeeeb7b68cbebc162b227e7052e8e55829a09212"
dependencies = [
"libc",
"x11",
]
[[package]]
name = "linux-raw-sys"
version = "0.4.15"
@@ -3491,7 +3472,6 @@ dependencies = [
"dpi",
"gtk",
"keyboard-types",
"libxdo",
"objc2 0.6.4",
"objc2-app-kit 0.3.2",
"objc2-core-foundation",
@@ -7625,16 +7605,6 @@ dependencies = [
"web-sys",
]
[[package]]
name = "x11"
version = "2.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e"
dependencies = [
"libc",
"pkg-config",
]
[[package]]
name = "x11-dl"
version = "2.21.0"
+14 -1
View File
@@ -180,7 +180,8 @@ Online nodes and the currently selected exit node cannot be forgotten.
² Newer and less battle-tested than on Linux.
³ Builds from source, not covered by CI.</sup>
The Linux CLI is a single static binary: it runs on any distribution.
The Linux release CLI is a single static musl binary, independent of the
distribution's libc. The tray uses dynamic desktop libraries.
## NixOS
@@ -226,6 +227,18 @@ cargo build --release --bin tsng # the agent and CLI
cargo build --release --bin tsunagi-tray # the tray (Linux needs GTK 3 and libayatana-appindicator)
```
These commands use the host target. On a glibc-based Linux distribution,
`target/release/tsng` is dynamically linked. For the static x86_64 Linux CLI,
release CI uses Zig 0.14.1 and `cargo-zigbuild` (with CMake, Clang and libclang
installed):
```sh
rustup target add x86_64-unknown-linux-musl
cargo zigbuild --release --locked --target x86_64-unknown-linux-musl --bin tsng
```
The static binary is `target/x86_64-unknown-linux-musl/release/tsng`.
Windows needs [Wintun](https://www.wintun.net) next to `tsng.exe`.
Per-platform notes: [Linux](dist/linux/README.md), [Arch](dist/arch/README.md),
[macOS](dist/macos/README.md), [Windows](dist/windows/README.md).
+3 -1
View File
@@ -19,7 +19,9 @@ tsunagi-core = { path = "../tsunagi-core", version = "0.1.0" }
# Native, lightweight GUI — no web engine. eframe re-exports egui.
eframe = { version = "0.31", default-features = false, features = ["default_fonts", "glow", "wayland", "x11"] }
# Cross-platform tray icon + menu (Windows tray, macOS menu bar, Linux SNI).
tray-icon = "0.21"
# libxdo only implements predefined Copy/Cut/Paste/SelectAll menu actions,
# which this tray does not use. Avoid a distro-specific libxdo SONAME dependency.
tray-icon = { version = "0.21", default-features = false }
# Background worker that talks to the agent off the UI thread.
tokio = { version = "1.53", features = ["rt", "rt-multi-thread", "sync", "time", "macros"] }
tracing.workspace = true
+1 -1
View File
@@ -45,7 +45,7 @@ usermod -aG tsunagi "$USER"`. The group also lets its members configure
systemd-resolved for the overlay zones through the polkit rule.
The GUI package depends on `gtk3`, `libayatana-appindicator` (the tray icon),
`xdotool` (its `libxdo`), and the usual windowing libraries.
and the usual windowing libraries.
## Removal
+1 -1
View File
@@ -52,7 +52,7 @@ if [ -n "$tray" ]; then
relations=$'conflict = tsunagi\nprovides = tsunagi\nreplaces = tsunagi\n'
# What the tray and its window load at run time; none of it is linked in
# statically, so pacman has to be told.
for dep in gtk3 libayatana-appindicator xdotool libxkbcommon wayland libx11 libglvnd; do
for dep in gtk3 libayatana-appindicator libxkbcommon wayland libx11 libglvnd; do
relations+="depend = ${dep}"$'\n'
done
install -D -m 0755 "$tray" "$root/usr/bin/tsunagi-tray"
+1 -1
View File
@@ -46,7 +46,7 @@ if [ -n "$tray" ]; then
# with it (both ship /usr/bin/tsng).
extra_control=$'Conflicts: tsunagi\nReplaces: tsunagi\nProvides: tsunagi\n'
# What the tray and its window load at run time.
extra_control+=$'Depends: libgtk-3-0 | libgtk-3-0t64, libayatana-appindicator3-1 | libappindicator3-1, libxdo3, libxkbcommon0, libwayland-client0, libx11-6, libgl1\n'
extra_control+=$'Depends: libgtk-3-0 | libgtk-3-0t64, libayatana-appindicator3-1 | libappindicator3-1, libxkbcommon0, libwayland-client0, libx11-6, libgl1\n'
desc_gui=" It also installs the tray GUI (tsunagi-tray) and a desktop launcher so it can be started from the applications menu."
install -D -m 0755 "$tray" "$root/usr/bin/tsunagi-tray"
install -D -m 0644 "$here/../linux/tsunagi-tray.desktop" \
-2
View File
@@ -11,7 +11,6 @@
libxkbcommon,
vulkan-loader,
wayland,
xdotool,
libx11,
libxcursor,
libxi,
@@ -62,7 +61,6 @@ rustPlatform.buildRustPackage {
buildInputs = lib.optionals withTray [
gtk3
libayatana-appindicator
xdotool
];
dontWrapGApps = true;