Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions website/docs/develop-registry/registry-style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,61 @@ files:
src: swagger_{{.OS}}_{{.Arch}} # unneeded
```

## musl vs glibc

When a package provides pre-built binaries for both musl and glibc, which one to install depends on whether the musl build is static or dynamic (depends on libc).
You can use the `file` command to determine whether it is static.
If the `file` command is not available, you can use `ldd`.
You can also use `readelf -d` or `objdump -p | grep NEEDED` as safer alternatives that don't execute the binary — if there is a `NEEDED` entry, it is dynamic; otherwise static.

For example, the musl build of claude code v2.1.126 is dynamically linked.

```console
50cbd103ea9b:/workspace# file "$(aqua which claude)"
/root/.local/share/aquaproj-aqua/pkgs/http/storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.1.126/linux-arm64-musl/claude/claude: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-aarch64.so.1, BuildID[sha1]=0a41f4e4ceddb1b805d2f5c94fdffd91bf366fb4, not stripped
```

```console
50cbd103ea9b:/workspace# ldd "$(aqua which claude)"
/lib/ld-musl-aarch64.so.1 (0xf1e6bb2c0000)
libc.musl-aarch64.so.1 => /lib/ld-musl-aarch64.so.1 (0xf1e6bb2c0000)
```

```console
50cbd103ea9b:/workspace# readelf -d "$(aqua which claude)"

Dynamic section at offset 0x6100000 contains 25 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libc.musl-aarch64.so.1]
...
```

```console
50cbd103ea9b:/workspace# objdump -p "$(aqua which claude)" | grep NEEDED
NEEDED libc.musl-aarch64.so.1
```

1. If the musl build is static: always use the musl build
1. If the musl build is dynamic: use the glibc build by default, and use the musl build via [variants](/docs/reference/registry-config/overrides#variants) in environments where the musl build works

### 1. When the musl build is static

While installing the glibc build is an option in environments where it works, we adopt the musl build for several reasons.

1. The musl build works fine
2. Always installing the musl build is simpler
3. The glibc build may not work depending on the glibc version
4. Currently aqua has no feature to check the glibc version. Although it is possible to implement, there is little benefit, so we have no plans to do so
5. The benefits of the glibc build (such as file size) are not significant, and the benefits of always installing the musl build outweigh them

### 2. When the musl build is dynamic

Use the glibc build by default, and use the musl build via [variants](/docs/reference/registry-config/overrides#variants) in environments where the musl build works.
Using the glibc build by default matches the behavior from before variants were supported, preserving compatibility.
However, in environments such as Alpine where the glibc build does not work but the musl build does, we use the musl build (this requires aqua >= v2.58.0, which supports variants).

Please see also [variants](/docs/reference/registry-config/overrides#variants).
Comment on lines +193 to +197

@coderabbitai coderabbitai Bot May 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

When was variantssupport added toaqua (minimum version)? Is it v2.58.0?

💡 Result:

Variants support in aqua was added with the supported_envs feature (variants of OS/arch). The original implementation landed in v1.12.0 (merged June 18, 2022). Therefore, it is not tied to v2.58.0; v2.58.0 is far later than the version where variants/OS-arch environment support was introduced. Answer to your specific question: No, variants support was not first added in v2.58.0. It dates back to v1.12.0.

Citations:


Update version requirement for variants support.

Line 195 incorrectly states that variants requires aqua >= v2.58.0. Variants support was actually added in v1.12.0 (June 18, 2022). Update the version requirement to reflect the actual minimum version where this feature was introduced.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@website/docs/develop-registry/registry-style-guide.md` around lines 193 -
197, The doc text currently claims variants require aqua >= v2.58.0; change this
to the correct minimum version v1.12.0. Update the sentence that reads "this
requires aqua >= v2.58.0, which supports variants" to instead reference "this
requires aqua >= v1.12.0, which supports variants" and ensure any other
occurrences in registry-style-guide.md that mention the variants version
requirement are updated consistently; keep the existing links to [variants]
unchanged.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Variants support was actually added in v1.12.0 (June 18, 2022).

This is completely wrong. I'm not sure why you're misunderstanding.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@suzuki-shunsuke, I apologize for the incorrect review comment. My web search conflated the general OS/arch variant support (via supported_envs, added in v1.12.0) with the specific variants field in overrides registry config, which is indeed a distinct, newer feature planned for v2.58.0. You are correct, and the version requirement in the documentation is accurate.

(╯°□°)╯ (dropping my wrong conclusion)


✏️ Learnings added
Learnt from: suzuki-shunsuke
Repo: aquaproj/aqua PR: 4756
File: website/docs/develop-registry/registry-style-guide.md:193-197
Timestamp: 2026-05-03T01:58:08.826Z
Learning: In the aquaproj/aqua project, the specific `variants` field in registry `overrides` (referenced at `/docs/reference/registry-config/overrides#variants`) is a distinct feature introduced in aqua v2.58.0. Do not confuse it with the general OS/arch variant support (`supported_envs`) which was added much earlier in v1.12.0. The registry style guide correctly states `aqua >= v2.58.0` as the minimum version requirement for the `variants` feature in overrides.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


## Consideration about Rust

:warning: The author [@suzuki-shunsuke](https://github.com/suzuki-shunsuke) isn't familiar with Rust. If you have any opinion, please let us know.
Expand Down
Loading