Skip to content

chore: add liamd and liam-init with a static release build - #4

Merged
oddurs merged 2 commits into
mainfrom
chore/0012-cargo-workspace
Sep 29, 2026
Merged

oddurs merged 2 commits into
mainfrom
chore/0012-cargo-workspace

Conversation

@oddurs

@oddurs oddurs commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

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

  • Adds the liamd and liam-init binaries. Each has --version only, plus an integration test.
  • mimalloc is the global allocator in liamd, because musl's allocator locks globally.
  • Release profile: fat LTO, one codegen unit, panic = "abort", strip = true.
  • scripts/task build:static builds x86_64-unknown-linux-musl release binaries and fails unless file(1) reports them as static. A new static CI job runs it on Linux, and required now waits for it.
  • The musl target is added to 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

size baseline, 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:static is Linux-only and refuses on macOS, so on a Mac the static build is verified only in CI.
  • CI installs musl-tools with apt, which is the one toolchain detail outside scripts/task.
  • The binaries are placeholders. The point of this change is the pipeline, not the programs.

Checks

  • scripts/task check is green locally
  • cairn item 0012 is closed with a result, and its evidence is in notes
  • No attribution to an assistant anywhere in the commits or this description

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
@oddurs
oddurs merged commit d72a4e1 into main Sep 29, 2026
3 checks passed
@oddurs
oddurs deleted the chore/0012-cargo-workspace branch September 29, 2026 02:48
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.

1 participant