Repository navigation
chore: add liamd and liam-init with a static release build - #4
Merged
Merged
Conversation
The image binaries have to be static musl executables, because an image has no dynamic linker. build:static builds them with the release profile and fails unless file(1) calls each one static. CI runs it on Linux. Refs: 0012
Refs: 0012, 0023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The image binaries have to be static musl executables, because an image has no dynamic linker. Until something builds them that way and rejects anything else, the size budget has nothing to measure. Refs cairn 0012.
Approach
liamdandliam-initbinaries. Each has--versiononly, plus an integration test.panic = "abort",strip = true.scripts/task build:staticbuildsx86_64-unknown-linux-muslrelease binaries and fails unlessfile(1)reports them as static. A newstaticCI job runs it on Linux, andrequirednow waits for it.rust-toolchain.toml.I rejected creating the four empty library crates the item lists. Each has an item (0017–0020) that creates it with real code, and empty crates are dead scaffolding.
Budget impact
sizebaseline, from CI: liamd is 543,400 bytes and liam-init is 397,880 bytes, both static-pie and stripped. liam-init is already about 100 KB over item 0023's 300 KB criterion, and I noted that on 0023.Look at this sceptically
build:staticis Linux-only and refuses on macOS, so on a Mac the static build is verified only in CI.musl-toolswith apt, which is the one toolchain detail outsidescripts/task.Checks
scripts/task checkis green locally