Skip to content

Switch to xx-cargo#6640

Open
dfunkt wants to merge 1 commit intodani-garcia:mainfrom
dfunkt:switch-to-xx_cargo
Open

Switch to xx-cargo#6640
dfunkt wants to merge 1 commit intodani-garcia:mainfrom
dfunkt:switch-to-xx_cargo

Conversation

@dfunkt
Copy link
Copy Markdown
Contributor

@dfunkt dfunkt commented Dec 31, 2025

Could also switch to use lld as the linker if wanted.

@BlackDex
Copy link
Copy Markdown
Collaborator

In my previous tests this needed to have very large package based installed to get it to work properly.
So large, that it took long for everything to install, and the cache grew a lot. Though it might make it more easier, it doesn't make it faster.

If that currently isn't the case, then it might be fine i guess (I haven't tested it out yet).

@dfunkt
Copy link
Copy Markdown
Contributor Author

dfunkt commented Dec 31, 2025

Did some testing myself:
https://github.com/dfunkt/vaultwarden/actions/runs/20623608272 (no cache, no xx-cargo)
https://github.com/dfunkt/vaultwarden/actions/runs/20623877337 (cache, no xx-cargo)
https://github.com/dfunkt/vaultwarden/actions/runs/20624107159 (no cache, xx-cargo)
https://github.com/dfunkt/vaultwarden/actions/runs/20624316811 (cache, xx-cargo)

  1. Build times:
    image image
    a) (no cache, no xx-cargo) -> Total duration: 11m 56s
    b) (cache, no xx-cargo) -> Total duration: 9m 38s
    image image
    c) (no cache, xx-cargo) -> Total duration: 12m 31s
    d) (cache, xx-cargo) -> Total duration: 9m 6s

  2. Cache size:

First run (no cache before the run, no xx-cargo):
 ghcr.io/dfunkt/vaultwarden-buildcache:debian-amd64
/  887.99M
 ghcr.io/dfunkt/vaultwarden-buildcache:debian-arm64
/  848.33M
 ghcr.io/dfunkt/vaultwarden-buildcache:debian-armv6
/  984.50M
 ghcr.io/dfunkt/vaultwarden-buildcache:debian-armv7
/  983.50M

Second run (cache, no xx-cargo):
 ghcr.io/dfunkt/vaultwarden-buildcache:debian-amd64
/  888.70M
 ghcr.io/dfunkt/vaultwarden-buildcache:debian-arm64
/  848.99M
 ghcr.io/dfunkt/vaultwarden-buildcache:debian-armv6
/  985.13M
 ghcr.io/dfunkt/vaultwarden-buildcache:debian-armv7
/  984.12M

First run (no cache before the run, xx-cargo):
 ghcr.io/dfunkt/vaultwarden-buildcache:debian-amd64
/  886.87M
 ghcr.io/dfunkt/vaultwarden-buildcache:debian-arm64
/  842.84M
 ghcr.io/dfunkt/vaultwarden-buildcache:debian-armv6
/  939.10M
 ghcr.io/dfunkt/vaultwarden-buildcache:debian-armv7
/  938.04M

Second run (cache, xx-cargo):
 ghcr.io/dfunkt/vaultwarden-buildcache:debian-amd64
/  887.57M
 ghcr.io/dfunkt/vaultwarden-buildcache:debian-arm64
/  843.53M
 ghcr.io/dfunkt/vaultwarden-buildcache:debian-armv6
/  939.80M
 ghcr.io/dfunkt/vaultwarden-buildcache:debian-armv7
/  938.71M
  1. Packages installed (used armv7 for comparison)
    apt-get (no xx-cargo)
#24 2.260 The following additional packages will be installed:
#24 2.260   clang-19 git-man libbrotli1 libclang-common-19-dev libclang-cpp19
#24 2.260   libclang1-19 libcom-err2 libcurl3t64-gnutls libedit2 liberror-perl libexpat1
#24 2.260   libffi8 libgc1 libgdbm-compat4t64 libgdbm6t64 libgnutls30t64
#24 2.260   libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0
#24 2.260   libldap2 libllvm19 libnghttp2-14 libnghttp3-9 libngtcp2-16
#24 2.260   libngtcp2-crypto-gnutls8 libobjc-14-dev libobjc4 libp11-kit0 libperl5.40
#24 2.261   libpkgconf3 libpsl5t64 librtmp1 libsasl2-2 libsasl2-modules-db libssh2-1t64
#24 2.261   libstdc++-14-dev libtasn1-6 libxml2 libz3-4 llvm-19-linker-tools perl
#24 2.261   perl-modules-5.40 pkgconf pkgconf-bin
#24 2.262 Suggested packages:
#24 2.262   clang-19-doc wasi-libc gettext-base git-doc git-email git-gui gitk gitweb
#24 2.262   git-cvs git-mediawiki git-svn gdbm-l10n gnutls-bin krb5-doc krb5-user
#24 2.262   sensible-utils libstdc++-14-doc perl-doc libterm-readline-gnu-perl
#24 2.262   | libterm-readline-perl-perl make libtap-harness-archive-perl
#24 2.262 Recommended packages:
#24 2.262   llvm-19-dev python3 clang-tools-19 patch less ssh-client libclang-rt-19-dev
#24 2.262   krb5-locales libldap-common publicsuffix libsasl2-modules netbase
#24 2.472 The following NEW packages will be installed:
#24 2.472   clang clang-19 git git-man libbrotli1 libc6-armhf-cross
#24 2.472   libc6-dev-armhf-cross libclang-common-19-dev libclang-cpp19 libclang1-19
#24 2.472   libcom-err2 libcurl3t64-gnutls libedit2 liberror-perl libexpat1 libffi8
#24 2.472   libgc1 libgdbm-compat4t64 libgdbm6t64 libgnutls30t64 libgssapi-krb5-2
#24 2.472   libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap2 libllvm19
#24 2.472   libnghttp2-14 libnghttp3-9 libngtcp2-16 libngtcp2-crypto-gnutls8
#24 2.473   libobjc-14-dev libobjc4 libp11-kit0 libperl5.40 libpkgconf3 libpsl5t64
#24 2.473   librtmp1 libsasl2-2 libsasl2-modules-db libssh2-1t64 libstdc++-14-dev
#24 2.473   libtasn1-6 libxml2 libz3-4 linux-libc-dev-armhf-cross llvm-19-linker-tools
#24 2.473   perl perl-modules-5.40 pkg-config pkgconf pkgconf-bin
#24 2.518 0 upgraded, 52 newly installed, 0 to remove and 0 not upgraded.
#24 2.518 Need to get 82.4 MB of archives.
#24 2.518 After this operation, 431 MB of additional disk space will be used.

xx-apt-get (no xx-cargo)

#24 21.64 The following additional packages will be installed:
#24 21.64   binutils-arm-linux-gnueabihf cpp-14-arm-linux-gnueabihf
#24 21.64   cpp-arm-linux-gnueabihf gcc-14-arm-linux-gnueabihf
#24 21.64   gcc-14-arm-linux-gnueabihf-base gcc-14-base:armhf gcc-14-cross-base
#24 21.64   libasan8-armhf-cross libatomic1-armhf-cross libc6:armhf libc6-dev:armhf
#24 21.64   libcom-err2:armhf libcrypt-dev:armhf libcrypt1:armhf libdb5.3t64:armhf
#24 21.64   libgcc-14-dev-armhf-cross libgcc-s1:armhf libgcc-s1-armhf-cross
#24 21.64   libgomp1-armhf-cross libgssapi-krb5-2:armhf libk5crypto3:armhf
#24 21.64   libkeyutils1:armhf libkrb5-3:armhf libkrb5support0:armhf libldap2:armhf
#24 21.65   libmariadb3:armhf libsasl2-2:armhf libsasl2-modules-db:armhf
#24 21.65   libssl3t64:armhf libstdc++6-armhf-cross libubsan1-armhf-cross libzstd1:armhf
#24 21.65   mariadb-common mysql-common zlib1g:armhf
#24 21.65 Suggested packages:
#24 21.65   binutils-doc gcc-14-locales cpp-14-doc cpp-doc gcc-14-doc make manpages-dev
#24 21.65   autoconf automake libtool flex bison gdb-arm-linux-gnueabihf gcc-doc
#24 21.65   glibc-doc:armhf libc-l10n:armhf locales:armhf libnss-nis:armhf
#24 21.65   libnss-nisplus:armhf manpages-dev:armhf krb5-doc:armhf krb5-user:armhf
#24 21.65   postgresql-doc-17:armhf libssl-doc:armhf
#24 21.65 Recommended packages:
#24 21.65   libidn2-0:armhf krb5-locales:armhf libldap-common:armhf
#24 21.65   libsasl2-modules:armhf
#24 21.85 The following NEW packages will be installed:
#24 21.85   binutils-arm-linux-gnueabihf cpp-14-arm-linux-gnueabihf
#24 21.85   cpp-arm-linux-gnueabihf gcc-14-arm-linux-gnueabihf
#24 21.85   gcc-14-arm-linux-gnueabihf-base gcc-14-base:armhf gcc-14-cross-base
#24 21.85   gcc-arm-linux-gnueabihf libasan8-armhf-cross libatomic1-armhf-cross
#24 21.85   libc6:armhf libc6-dev:armhf libcom-err2:armhf libcrypt-dev:armhf
#24 21.85   libcrypt1:armhf libdb5.3t64:armhf libgcc-14-dev-armhf-cross libgcc-s1:armhf
#24 21.85   libgcc-s1-armhf-cross libgomp1-armhf-cross libgssapi-krb5-2:armhf
#24 21.85   libk5crypto3:armhf libkeyutils1:armhf libkrb5-3:armhf libkrb5support0:armhf
#24 21.85   libldap2:armhf libmariadb-dev:armhf libmariadb3:armhf libpq-dev:armhf
#24 21.86   libpq5:armhf libsasl2-2:armhf libsasl2-modules-db:armhf libssl-dev:armhf
#24 21.86   libssl3t64:armhf libstdc++6-armhf-cross libubsan1-armhf-cross libzstd1:armhf
#24 21.86   mariadb-common mysql-common zlib1g:armhf zlib1g-dev:armhf
#24 21.91 0 upgraded, 41 newly installed, 0 to remove and 0 not upgraded.
#24 21.91 Need to get 45.4 MB of archives.
#24 21.91 After this operation, 179 MB of additional disk space will be used.

apt-get (xx-cargo)

#24 2.137 The following additional packages will be installed:
#24 2.137   clang-19 git-man libbrotli1 libclang-common-19-dev libclang-cpp19
#24 2.137   libclang1-19 libcom-err2 libcurl3t64-gnutls libedit2 liberror-perl libexpat1
#24 2.138   libffi8 libgc1 libgdbm-compat4t64 libgdbm6t64 libgnutls30t64
#24 2.138   libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0
#24 2.138   libldap2 libllvm19 libnghttp2-14 libnghttp3-9 libngtcp2-16
#24 2.138   libngtcp2-crypto-gnutls8 libobjc-14-dev libobjc4 libp11-kit0 libperl5.40
#24 2.138   libpsl5t64 librtmp1 libsasl2-2 libsasl2-modules-db libssh2-1t64
#24 2.138   libstdc++-14-dev libtasn1-6 libxml2 libz3-4 llvm-19-linker-tools perl
#24 2.138   perl-modules-5.40
#24 2.139 Suggested packages:
#24 2.139   clang-19-doc wasi-libc gettext-base git-doc git-email git-gui gitk gitweb
#24 2.139   git-cvs git-mediawiki git-svn gdbm-l10n gnutls-bin krb5-doc krb5-user
#24 2.139   sensible-utils libstdc++-14-doc perl-doc libterm-readline-gnu-perl
#24 2.139   | libterm-readline-perl-perl make libtap-harness-archive-perl
#24 2.139 Recommended packages:
#24 2.139   llvm-19-dev python3 clang-tools-19 patch less ssh-client libclang-rt-19-dev
#24 2.139   krb5-locales libldap-common publicsuffix libsasl2-modules netbase
#24 2.340 The following NEW packages will be installed:
#24 2.340   clang clang-19 git git-man libbrotli1 libclang-common-19-dev libclang-cpp19
#24 2.340   libclang1-19 libcom-err2 libcurl3t64-gnutls libedit2 liberror-perl libexpat1
#24 2.340   libffi8 libgc1 libgdbm-compat4t64 libgdbm6t64 libgnutls30t64
#24 2.340   libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0
#24 2.340   libldap2 libllvm19 libnghttp2-14 libnghttp3-9 libngtcp2-16
#24 2.340   libngtcp2-crypto-gnutls8 libobjc-14-dev libobjc4 libp11-kit0 libperl5.40
#24 2.340   libpsl5t64 librtmp1 libsasl2-2 libsasl2-modules-db libssh2-1t64
#24 2.341   libstdc++-14-dev libtasn1-6 libxml2 libz3-4 llvm-19-linker-tools perl
#24 2.341   perl-modules-5.40
#24 2.377 0 upgraded, 45 newly installed, 0 to remove and 0 not upgraded.
#24 2.377 Need to get 77.6 MB of archives.
#24 2.377 After this operation, 422 MB of additional disk space will be used.

xx-apt-get (xx-cargo)

#24 23.22 The following additional packages will be installed:
#24 23.22   gcc-12-base:armhf gcc-14-base:armhf libasan8:armhf libatomic1:armhf
#24 23.22   libc6:armhf libcom-err2:armhf libcrypt-dev:armhf libcrypt1:armhf
#24 23.22   libdb5.3t64:armhf libgcc-s1:armhf libgomp1:armhf libgssapi-krb5-2:armhf
#24 23.22   libk5crypto3:armhf libkeyutils1:armhf libkrb5-3:armhf libkrb5support0:armhf
#24 23.22   libldap2:armhf libmariadb3:armhf libpkgconf3 libsasl2-2:armhf
#24 23.22   libsasl2-modules-db:armhf libssl3t64:armhf libstdc++6:armhf libubsan1:armhf
#24 23.22   libzstd1:armhf mariadb-common mysql-common pkgconf:armhf pkgconf-bin
#24 23.22   zlib1g:armhf
#24 23.22 Suggested packages:
#24 23.22   glibc-doc:armhf libc-l10n:armhf locales:armhf libnss-nis:armhf
#24 23.22   libnss-nisplus:armhf manpages-dev:armhf krb5-doc:armhf krb5-user:armhf
#24 23.22   postgresql-doc-17:armhf libssl-doc:armhf
#24 23.22 Recommended packages:
#24 23.22   libidn2-0:armhf krb5-locales:armhf libldap-common:armhf
#24 23.22   libsasl2-modules:armhf
#24 23.43 The following NEW packages will be installed:
#24 23.43   gcc-12-base:armhf gcc-14-base:armhf libasan8:armhf libatomic1:armhf
#24 23.43   libc6:armhf libc6-dev:armhf libcom-err2:armhf libcrypt-dev:armhf
#24 23.43   libcrypt1:armhf libdb5.3t64:armhf libgcc-12-dev:armhf libgcc-s1:armhf
#24 23.43   libgomp1:armhf libgssapi-krb5-2:armhf libk5crypto3:armhf libkeyutils1:armhf
#24 23.43   libkrb5-3:armhf libkrb5support0:armhf libldap2:armhf libmariadb-dev:armhf
#24 23.43   libmariadb3:armhf libpkgconf3 libpq-dev:armhf libpq5:armhf libsasl2-2:armhf
#24 23.43   libsasl2-modules-db:armhf libssl-dev:armhf libssl3t64:armhf libstdc++6:armhf
#24 23.43   libubsan1:armhf libzstd1:armhf mariadb-common mysql-common pkg-config:armhf
#24 23.43   pkgconf:armhf pkgconf-bin zlib1g:armhf zlib1g-dev:armhf
#24 23.49 0 upgraded, 38 newly installed, 0 to remove and 0 not upgraded.
#24 23.49 Need to get 17.1 MB of archives.
#24 23.49 After this operation, 77.9 MB of additional disk space will be used.

- removes a lot of additional configuration lines from the Dockerfile
- includes the workaround for the `openssl-sys` build issues with improper `pkg-config` setup
- for reference: tonistiigi/xx#108 (comment)
@dfunkt dfunkt force-pushed the switch-to-xx_cargo branch from b0cbf2a to 0a409f7 Compare January 2, 2026 09:20
Copy link
Copy Markdown
Collaborator

@BlackDex BlackDex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, did some testing locally, it does seem to download a bit less data.
It also makes the Dockerfile a bit less cluttered.

Same for this, lets wait after our next release before merging this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants