Skip to content

e3bc33d

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 30 Nov 20:09

feat(bundle): Ship the bundle as one executable file

selkies--, or -musl, runs as it is downloaded and needs the C
library alone to start. It is the bundle's server without its run path, then
the bundle as a ZIP archive. Any command but --version and --help unpacks
the bundle where it is not there yet and executes its server in place of the
downloaded one, so what runs is the bundle itself.

Staying in the downloaded server would lose what it finds through its run
path, libwayland-server and, on glibc, libglvnd as well as libpulse. A run
path on the download would name a directory beside wherever the file is,
which may be another user's to write to. The archive holds how the two
servers differ, about 500 bytes, and the server it gives has to match its
SHA-256 digest. The build checks that what the file unpacks is the bundle,
byte for byte.

The bundle goes to a directory in the user's state home named by the
archive's digest, one that only the user owns and can write to, and is
renamed into place whole. Where that cannot hold it or programs cannot run
from there, a directory of the user's own in the temporary directory does.
Where neither can, the server says so and goes on with the host's programs
and libraries alone.

cargo xtask executable makes the file beside the wheel. On its C library's
oldest host, CI starts two sessions at once (verify-executable.sh) and a bare
run on the Wayland backend (verify-standalone.sh). Both pass on CentOS 7,
AlmaLinux 8, and Alpine 3.22 on x86_64, without a GPU. The file is 94 to
95 MB and its tree 120 MB, and its first start takes 0.4 to 0.5 s longer than
later ones.