1
0
Fork 0
mirror of https://github.com/imjasonh/krust synced 2026-07-06 22:12:32 +00:00
Commit graph

166 commits

Author SHA1 Message Date
Jason Hall
15f4d9fd04
Merge pull request #75 from imjasonh/claude/update-docs-readme-td3LL 2026-03-18 18:54:35 -04:00
Claude
8b61055598
Fix zigbuild references: it's required, not optional
- Update overview to mention cargo-zigbuild instead of plain cargo build
- Change prerequisites from "recommended" to "required"
- Remove references to cargo build fallback (that code was removed)
- Add zigbuild/zig install to Quick Start
- Fix troubleshooting to mention both zig and cargo-zigbuild

https://claude.ai/code/session_019QkKmgPcFYaLwKe34EMFJy
2026-03-18 21:13:57 +00:00
Claude
b531cfebd6
Fix documentation inaccuracies in README and CLAUDE.md
- Remove phantom `-i, --image` CLI flag that doesn't exist in code
- Fix default base image from gcr.io/distroless/static:nonroot to cgr.dev/chainguard/static:latest
- Update --platform description to reflect auto-detection from base image
- Move -v/--verbose to Global Options (it's a global flag, not per-command)
- Add missing `version` command to CLI reference
- Fix non-existent `make test-verbose` reference
- Mark multi-platform image manifests as implemented in CLAUDE.md

https://claude.ai/code/session_019QkKmgPcFYaLwKe34EMFJy
2026-03-18 21:11:54 +00:00
Jason Hall
e9db7bfe11
Merge pull request #74 from imjasonh/claude/review-rust-builds-Sx7Ds
Simplify cross-compilation with cargo-zigbuild integration
2026-03-18 17:06:14 -04:00
Claude
c4d4ead5e9
Fix CI: add runner.arch to cache keys, force-install zigbuild
The cargo-zigbuild cache was shared between x86 and ARM runners
(cache key only used runner.os), causing "Exec format error" when
an ARM binary was restored on x86 or vice versa. Added runner.arch
to all cache keys and use --force install to overwrite stale binaries.

https://claude.ai/code/session_01EcsZDNeWn56wFqryb4Wq7r
2026-03-18 20:58:51 +00:00
Claude
9cf1e952e2
Fix CI: skip cargo-zigbuild install when cached binary works
cargo install fails with exit code 101 when the binary already exists
from cache. Check if cargo-zigbuild works first before installing.

https://claude.ai/code/session_01EcsZDNeWn56wFqryb4Wq7r
2026-03-18 20:53:21 +00:00
Claude
508913e07e
Fix zigbuild detection: use cargo zigbuild --help
cargo-zigbuild --version doesn't work reliably in all PATH configs.
Use cargo zigbuild --help instead, which uses cargo's subcommand
discovery to find the cargo-zigbuild binary. Also verify zigbuild
actually works in CI after installation.

https://claude.ai/code/session_01EcsZDNeWn56wFqryb4Wq7r
2026-03-18 20:46:09 +00:00
Claude
eb296df008
Fix CI: symlink python-zig to zig for cargo-zigbuild
The ziglang pip package installs as python-zig, not zig.
cargo-zigbuild needs zig in PATH, so create a symlink.

https://claude.ai/code/session_01EcsZDNeWn56wFqryb4Wq7r
2026-03-18 20:36:12 +00:00
Claude
a4b822b004
Fix cargo-zigbuild detection: use cargo-zigbuild binary directly
The require_zigbuild() check was using `cargo zigbuild --version` which
fails because cargo-zigbuild's subcommand doesn't support --version.
Changed to use `cargo-zigbuild --version` which works correctly.

Also reverted integration test changes to keep original behavior.

https://claude.ai/code/session_01EcsZDNeWn56wFqryb4Wq7r
2026-03-18 20:22:34 +00:00
Claude
eea19c3dcb
Fix CI: skip integration tests gracefully when tools unavailable
Integration tests now skip instead of panicking when Docker or
cargo-zigbuild aren't available. Also removed redundant make test-e2e
step from CI since make test already includes e2e tests.

https://claude.ai/code/session_01EcsZDNeWn56wFqryb4Wq7r
2026-03-18 20:07:25 +00:00
Claude
7a7ef3fd44
Require cargo-zigbuild, remove cross-linker fallback
- Make zigbuild a hard requirement instead of optional with fallback
- Remove configure_cross_linker and all system linker detection logic
- Remove apt-get install of system cross-linkers from CI
- Remove unused `which` dependency
- Fail fast with clear install instructions if zigbuild is missing

https://claude.ai/code/session_01EcsZDNeWn56wFqryb4Wq7r
2026-03-17 22:31:32 +00:00
Claude
06ea1a1b3e
Fix CI: use --break-system-packages for pip, cache zigbuild, keep apt fallback
- Ubuntu 24.04 blocks bare pip install (PEP 668), add --break-system-packages
- Move cache steps before cargo install so zigbuild binary can be cached
- Cache cargo-zigbuild binary separately, skip install if already cached
- Keep apt system cross-linkers as fallback alongside zigbuild

https://claude.ai/code/session_01EcsZDNeWn56wFqryb4Wq7r
2026-03-17 21:09:45 +00:00
Claude
3366c5b69d
Fix CI: use pip install ziglang for reliable zig installation
The snap install was unreliable and the apt fallback used a
non-existent package name. pip install ziglang is the recommended
way to install zig in CI environments.

https://claude.ai/code/session_01EcsZDNeWn56wFqryb4Wq7r
2026-03-17 20:46:44 +00:00
Claude
bb76a120c3
Use cargo-zigbuild for cross-compilation, add build caching
- Integrate cargo-zigbuild as the default build backend, falling back
  to cargo build with best-effort linker detection if not installed
- Auto-install rustup targets when missing (rustup target add)
- Use persistent target/krust/ directory instead of temp dirs so
  incremental compilation works across runs
- Remove .cargo/config.toml from repo (add to .gitignore) since
  zigbuild handles cross-linker configuration
- Improve error messages: suggest cargo-zigbuild when linker not found
- Simplify CI to use zigbuild instead of per-target system linkers
- Simplify Makefile by removing setup-cross-compile/verify targets
- Update README and CLAUDE.md to reflect new approach

https://claude.ai/code/session_01EcsZDNeWn56wFqryb4Wq7r
2026-03-17 20:33:41 +00:00
Jason Hall
68a9a86e1c
Merge pull request #66 from imjasonh/dependabot/github_actions/dtolnay/rust-toolchain-f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561
chore(deps): Bump dtolnay/rust-toolchain from 6d653acede28d24f02e3cd41383119e8b1b35921 to f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561
2026-03-17 15:58:30 -04:00
Jason Hall
31e5c5a5a3
Merge branch 'main' into dependabot/github_actions/dtolnay/rust-toolchain-f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 2026-03-17 15:46:51 -04:00
Jason Hall
66d996094a
Merge pull request #67 from imjasonh/dependabot/cargo/yaml-rust2-0.11
chore(deps): Update yaml-rust2 requirement from 0.10 to 0.11
2026-03-17 15:45:48 -04:00
bd5d27014e
Merge pull request #68 from imjasonh/dependabot/cargo/reqwest-0.13
chore(deps): Update reqwest requirement from 0.12 to 0.13
2026-03-17 15:45:38 -04:00
Jason Hall
42375d9ede
Merge pull request #70 from imjasonh/dependabot/github_actions/actions/checkout-6.0.2
chore(deps): Bump actions/checkout from 5.0.0 to 6.0.2
2026-03-17 15:45:27 -04:00
Jason Hall
a0a52f4b4e
Merge pull request #71 from imjasonh/dependabot/github_actions/actions/cache-5.0.3
chore(deps): Bump actions/cache from 4.3.0 to 5.0.3
2026-03-17 15:45:19 -04:00
Jason Hall
34eb98f633
Merge pull request #73 from imjasonh/claude/test-mutants-rs-K0dRx
Add comprehensive tests for binary name and subdir detection
2026-03-17 15:44:58 -04:00
Claude
fba01253e5
Add builder tests for --bin/--example args and get_binary_subdir
cargo-mutants revealed that get_binary_name's --bin/--example argument
parsing and get_binary_subdir had zero test coverage. These new tests
reduce missed mutants in the builder module from 34 to 10 (the remaining
10 are in RustBuilder::build which runs cargo and can't be unit tested).

https://claude.ai/code/session_01W3QJhFvej6fS1GevQm2vp7
2026-03-17 19:38:16 +00:00
Jason Hall
90e38a5438
Merge pull request #72 from imjasonh/claude/code-review-qmduJ
Refactor build/push logic and improve registry client
2026-03-17 15:21:35 -04:00
Claude
871ac2fb8f
Address second round of PR #72 review comments
- Deduplicate platform parsing: select_platform_manifest now uses
  crate::image::parse_platform_string instead of reimplementing
  the split/match logic inline
- Fix empty digest fallback: when docker-content-digest header is
  missing, compute sha256 digest from the response body instead of
  using an empty string
- Surface parse failures: get_image_platforms now returns errors
  instead of silently returning Ok(vec![]) when config parsing fails
  or the response is an unrecognized format

https://claude.ai/code/session_01RoAUcigxrM6Lz8DESr3SkW
2026-03-17 19:14:39 +00:00
Claude
54519cd6ed
Address PR #72 review comments
- Fix digest mismatch: select_platform_manifest now returns the
  platform-specific digest from docker-content-digest header instead
  of reusing the index-level digest
- Fix empty platform list: get_image_platforms fetches config blob for
  single-platform images to determine actual os/architecture
- Fix missing Accept header: add Docker manifest list media type
  (application/vnd.docker.distribution.manifest.list.v2+json) to
  Accept headers for broader registry compatibility

https://claude.ai/code/session_01RoAUcigxrM6Lz8DESr3SkW
2026-03-17 19:02:20 +00:00
Claude
452f4c8307
Fix bugs, code smells, and design issues found in code review
Bug fixes:
- Fix platform selection: fetch_image_data now uses the platform parameter
  to select the correct manifest from an image index instead of always
  picking the first entry
- Fix parse_platform to accept 3-part platforms (linux/arm/v7, linux/arm/v6)
  which previously caused a hard error at image creation time
- Fix variant always being None in manifest descriptors, now properly set
  for ARM platforms so registries can select the correct image
- Fix auth tests that used matches!() without assert!(), silently passing
- Fix create_test_binary using a dangling path after NamedTempFile drop

Design improvements:
- Implement real platform detection in get_image_platforms by fetching
  the image index from the registry instead of returning hardcoded defaults
- Deduplicate Platform type (was defined identically in manifest and registry)
- Extract shared build-and-push logic into build_and_push_platform() and
  push_tagged_manifest_list(), eliminating ~100 lines of duplication
  between Build and Resolve commands
- Use consistent OCI media types throughout instead of mixing Docker v2
  and OCI formats
- Rename config::RegistryAuth to config::RegistryCredential to avoid
  naming collision with registry::RegistryAuth
- Simplify push_manifest return type from (location, digest) to just digest
- Remove dead Push command that only printed an error
- Remove unused auth_cache field from RegistryClient

Robustness:
- URL-encode query parameters in token requests using reqwest::Url
- Add connect (30s) and request (300s) timeouts to HTTP client

https://claude.ai/code/session_01RoAUcigxrM6Lz8DESr3SkW
2026-03-17 18:40:51 +00:00
dependabot[bot]
58c11fed7f
chore(deps): Bump actions/cache from 4.3.0 to 5.0.3
Bumps [actions/cache](https://github.com/actions/cache) from 4.3.0 to 5.0.3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](0057852bfa...cdf6c1fa76)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 5.0.3
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-02 08:26:12 +00:00
dependabot[bot]
998a99188e
chore(deps): Bump actions/checkout from 5.0.0 to 6.0.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.0 to 6.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](08c6903cd8...de0fac2e45)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-26 08:27:34 +00:00
dependabot[bot]
9a96a08523
chore(deps): Update reqwest requirement from 0.12 to 0.13
Updates the requirements on [reqwest](https://github.com/seanmonstar/reqwest) to permit the latest version.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.0...v0.13.1)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-version: 0.13.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-05 08:19:42 +00:00
dependabot[bot]
7a78b0ec82
chore(deps): Update yaml-rust2 requirement from 0.10 to 0.11
Updates the requirements on [yaml-rust2](https://github.com/Ethiraric/yaml-rust2) to permit the latest version.
- [Release notes](https://github.com/Ethiraric/yaml-rust2/releases)
- [Changelog](https://github.com/Ethiraric/yaml-rust2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Ethiraric/yaml-rust2/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: yaml-rust2
  dependency-version: 0.11.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-22 08:19:06 +00:00
dependabot[bot]
9cece8229c
chore(deps): Bump dtolnay/rust-toolchain
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) from 6d653acede28d24f02e3cd41383119e8b1b35921 to f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases)
- [Commits](6d653acede...f7ccc83f9e)

---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
  dependency-version: f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-22 08:18:59 +00:00
Jason Hall
299101f0d7
Merge pull request #60 from imjasonh/copilot/fix-namespace-validation-error
Fix YAML multi-document corruption in krust resolve
2025-10-17 11:58:43 -04:00
copilot-swe-agent[bot]
c79a817432 Fix formatting and update dev workflow docs
Co-authored-by: imjasonh <210737+imjasonh@users.noreply.github.com>
2025-10-17 14:30:08 +00:00
copilot-swe-agent[bot]
cfd726fafe Add testscript test for YAML corruption regression
Co-authored-by: imjasonh <210737+imjasonh@users.noreply.github.com>
2025-10-17 14:16:04 +00:00
copilot-swe-agent[bot]
2edb1e7d36 Fix YAML multi-document corruption in krust resolve
Co-authored-by: imjasonh <210737+imjasonh@users.noreply.github.com>
2025-10-17 03:06:01 +00:00
copilot-swe-agent[bot]
f444a842e1 Initial plan 2025-10-17 02:58:11 +00:00
Jason Hall
d8b24de8e7
Merge pull request #58 from imjasonh/norelease
undo release stuff for now
2025-10-15 19:40:46 -04:00
Jason Hall
de64beadf7 also delete release.yaml
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-15 19:33:22 -04:00
Jason Hall
3f33a40fa4 undo release stuff for now
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-15 19:32:59 -04:00
Jason Hall
84081167b6
Merge pull request #57 from imjasonh/next2
next attempt at release
2025-10-15 19:07:45 -04:00
Jason Hall
66bdad3daa next attempt at release
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-15 18:59:18 -04:00
Jason Hall
8620191f42
Merge pull request #56 from imjasonh/next
next attempt at release
2025-10-15 18:55:09 -04:00
Jason Hall
1c84596a6b next attempt at release
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-15 18:47:56 -04:00
Jason Hall
427ec00fe5
Merge pull request #55 from imjasonh/pre-release
add release workflow
2025-10-15 18:45:12 -04:00
Jason Hall
19100904ba fix version test
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-15 18:37:36 -04:00
Jason Hall
cd24ed6b90 update version test
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-15 18:29:19 -04:00
Jason Hall
a4603c99e5 add release workflow
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-15 18:25:43 -04:00
Jason Hall
bba26792f8
Merge pull request #54 from imjasonh/ex
support building --example and --bin
2025-10-15 18:16:06 -04:00
Jason Hall
4a2471c22d support building --example and --bin
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-15 18:06:54 -04:00
Jason Hall
ecb8890df5
Merge pull request #53 from imjasonh/imjasonh-patch-1
Simplify usage instructions in README.md
2025-10-15 16:31:32 -04:00