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

8 commits

Author SHA1 Message Date
Jason Hall
1ed99cbe07 implement resolve and apply
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-15 14:46:18 -04:00
Jason Hall
e0df56704a
fix: implement cross-registry layer copying for layered images
Resolves GitHub issue #28 by implementing proper layered image building
that preserves base image properties and handles cross-registry scenarios.

Changes:
- Enhanced push_layered_image() to detect cross-registry pushes and copy base layers
- Implemented automatic blob copying from source registry to destination registry
- Always use layered approach instead of falling back to single-layer builds
- Added verification tests to ensure base image environment and files are preserved
- Consolidated unit tests into module files for better organization

This fixes "MANIFEST_BLOB_UNKNOWN" errors when pushing layered images that
reference base image blobs from different registries (e.g., cgr.dev → ttl.sh).

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 21:41:13 -04:00
Jason Hall
532198dd5a
chore: Add alpine-base example for multi-platform testing
- Add example/alpine-base project that uses Alpine Linux as base image
- Update CI extended-platforms job to use the example directory
- Simplifies CI configuration by moving test project to examples

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 00:40:32 -04:00
Jason Hall
11083dc527
Add Cargo.toml-based configuration for base image
- Add support for [package.metadata.krust] in Cargo.toml
- Change default base image to cgr.dev/chainguard/static:latest
- Add ProjectConfig struct to load project-specific settings
- Update documentation and example to show configuration usage
- Fix integration tests to explicitly pass directory argument
- This is the idiomatic way for Rust build tools to be configured
2025-06-07 22:14:21 -04:00
Jason Hall
6681c2aef5
Add pre-commit hooks for code quality
- Add .pre-commit-config.yaml with rustfmt, clippy, and cargo check
- Include standard pre-commit hooks for whitespace and file fixes
- Update README with development setup instructions
- Fix formatting and trailing whitespace in various files

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 21:27:18 -04:00
Jason Hall
5dc87b282e
Fix cross-compilation toolchain installation for all platforms
- macOS: Use messense/macos-cross-toolchains tap for musl toolchain
- Windows: Fix PowerShell syntax for creating cargo config
- Add verification step to check musl target installation
- Update builder to try platform-specific linker names
- Fix YAML syntax error in Windows config generation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 21:22:32 -04:00
Jason Hall
642472c548
Ensure all tests run on all platforms without skipping
- Remove test skipping based on target availability
- Install cross-compilation toolchains for all platforms in CI:
  - Ubuntu: musl-tools
  - macOS: musl-cross with proper cargo config
  - Windows: rust-lld linker
- Update builder to use platform-appropriate linkers
- Make full build/run workflow test mandatory in CI
- Add Docker setup and local registry for integration tests
- Set RUSTFLAGS with --cfg ci to enable CI-specific test behavior

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 21:17:30 -04:00
Jason Hall
5e89023925
Initial commit: krust - container image build tool for Rust
krust builds container images for Rust applications without Docker:
- Builds static binaries using musl libc
- Creates minimal OCI container images
- Pushes to any OCI-compliant registry
- Outputs digest to stdout for composability

Inspired by ko.build for Go applications.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 20:46:08 -04:00