Skip to content

Commit

Permalink
Use dbus instead of zbus for desktop notifications (#423)
Browse files Browse the repository at this point in the history
zbus adds an entire async runtime to the binary and brings 90
dependencies (102 to 192).

The final release binary size is 8.2M (4.2M stripped) with zbus and 6.3M
(2.8M stripped) with dbus. Statically linked, 8.5M (4.4M stripped) with
zbus and 6.8M (3.1M stripped).

Since the dbus runtime dependency is fairly common (for example used by
the google-chrome package on Ubuntu) I suspect most users will already
have it installed, or at least will be able to easily install it.

Runtime dependencies before:

    linux-vdso.so.1
    libgcc_s.so.1
    libc.so.6
    /lib64/ld-linux-x86-64.so.2

After:

    linux-vdso.so.1
    libdbus-1.so.3
    libgcc_s.so.1
    libc.so.6
    /lib64/ld-linux-x86-64.so.2
    libsystemd.so.0
    liblzma.so.5
    libzstd.so.1
    liblz4.so.1
    libcap.so.2
    libgcrypt.so.20
    libgpg-error.so.0
  • Loading branch information
osa1 authored Apr 6, 2024
1 parent c6d380c commit 1637216
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 820 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,4 @@ jobs:
run: |
RUST_BACKTRACE=1 \
cargo build --release --verbose --target=x86_64-unknown-linux-musl \
--features=desktop-notifications
--features=desktop-notifications-static-linking
Loading

0 comments on commit 1637216

Please sign in to comment.