Add musl libc - #557
Conversation
📝 WalkthroughWalkthroughAdds a musl 1.2.6 package definition and build script. The package builds and stages binaries, libraries, headers, and Changesmusl package
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/musl/build.sh (1)
1-2: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse the package build-shell convention.
packages/musl/build.shonly uses POSIX shell syntax, so the Bash shebang and option flags should use#!/bin/shandset -e.Proposed change
-#!/bin/bash -set -euo pipefail +#!/bin/sh +set -e🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/musl/build.sh` around lines 1 - 2, Update the package build script header to use the POSIX shell convention: replace the Bash shebang and pipefail-enabled options with #!/bin/sh and set -e, preserving the script’s existing behavior.Source: Learnings
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/musl/build.sh`:
- Around line 1-2: Update the package build script header to use the POSIX shell
convention: replace the Bash shebang and pipefail-enabled options with #!/bin/sh
and set -e, preserving the script’s existing behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 63b3b38e-6396-49cd-bc07-c8c7f032f629
📒 Files selected for processing (2)
packages/musl/build.nclpackages/musl/build.sh
|
The contract for the build outputs from a package is that they don't overlap with those of any other package. The tools in the Minimal Public Registry are based on glibc. Coexistence with musl C is not something we have planned for. What is your use case for having musl C? If it's producing an Alpine-like rootfs as a package output, see https://github.com/gominimal/pkgs/tree/main/packages/microvm-rootfs |
|
/build |
|
(I'm curious to see the artifacts on the other side but agree with Mike that its not likely to gel well with the other packages) |
|
Cool, I understand. I'll close this PR. |
Summary
Adds build of muslc to enable 'alpine' like rootfs
Related issues
Changes
While this PR contains basic muslc build, I don't know if/see how we support compiling rest of the packages without glibc. If this PR causes issues with base libc functionality, I can also rename this to musl-gcc.
Checklist
min checkpasses for the affected packages/harnesses.min patched-build <name>succeeds for any package I added or modified.source_provenancepoints to the canonical upstream and the source builds from source (not a prebuilt release binary) where the required toolchain is available.sha256against the upstream archive.Notes for reviewers
Summary by CodeRabbit