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

24 commits

Author SHA1 Message Date
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
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
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
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
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
66bdad3daa next attempt at release
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-15 18:59:18 -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
a4603c99e5 add release workflow
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-15 18:25:43 -04:00
Jason Hall
5eab01622e migrate to rust-yaml2
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-15 15:16:35 -04:00
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
e47442d04d successfully pushed to GAR
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-15 11:58:05 -04:00
Jason Hall
24685b4331 migrate integration tests to testscript
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-14 22:18:53 -04:00
dependabot[bot]
c368ddff1c
chore(deps): Update toml requirement from 0.8 to 0.9
Updates the requirements on [toml](https://github.com/toml-rs/toml) to permit the latest version.
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.9.7)

---
updated-dependencies:
- dependency-name: toml
  dependency-version: 0.9.7
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-22 08:53:55 +00:00
Jason Hall
9dc786c3f1
feat: replace vendor/oci-distribution with direct OCI Distribution Spec implementation
Replace the vendor/oci-distribution dependency with a custom implementation
that directly follows the OCI Distribution Specification using hyper for HTTP.

Key improvements:
- Direct HTTP implementation using hyper, hyper-util, and hyper-tls
- Support for Bearer token, Basic auth, and Anonymous authentication
- Cross-registry blob copying for layered images
- Multi-platform manifest list support
- Better error handling and redirect support
- Reduced dependency footprint

Technical changes:
- Remove vendor/oci-distribution dependency
- Add hyper ecosystem dependencies for HTTP client
- Implement OCI types: OciDescriptor, OciImageManifest, OciImageIndex
- Add ImageReference parsing with registry/repository/tag/digest support
- Implement registry authentication flows (Bearer token requests)
- Add blob upload/download with redirect handling
- Support manifest pulling with image index resolution
- Fix manifest size validation for Docker compatibility
- Update integration tests to use new registry auth types
- Handle docker.io redirect to registry-1.docker.io correctly

This enables more flexible authentication handling and reduces external
dependencies while maintaining full OCI compliance.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 22:25:10 -04:00
Jason Hall
a6ae83c3b2
feat: Add credential helper support to oci-distribution
- Move Docker config parsing and credential helper execution from krust
- Add automatic auth resolution methods (*_auto) to the client
- Support standard Docker config locations and environment variables
- Add comprehensive tests and examples
- Simplify krust to use the new credential helper functionality
2025-06-08 10:30:41 -04:00
Jason Hall
7827c25d9b
feat: Fork oci-distribution and add enhanced features
- Fork oci-distribution v0.11.0 into vendor/oci-distribution
- Add get_image_platforms() method for proper platform detection
- Support fetching config blobs for single-platform images
- Add OAuth2/Bearer token authentication support
- Add push_manifest_and_get_digest() for reliable digest extraction
- Update krust to use the forked version with enhanced features
2025-06-08 09:49:41 -04:00
Jason Hall
b6b0c71d0c
feat: Implement registry authentication support
This implements authentication for container registries, porting
functionality from go-containerregistry's authn package to Rust.

Key features:
- AuthConfig struct for various auth types (basic, bearer, anonymous)
- Authenticator trait for pluggable auth providers
- DefaultKeychain that reads Docker config files from standard locations
- Support for credential helpers (docker-credential-*)
- Integration with oci-distribution for registry operations

The implementation checks for credentials in this order:
1. DOCKER_CONFIG environment variable
2. REGISTRY_AUTH_FILE environment variable
3. XDG_RUNTIME_DIR/containers/auth.json
4. HOME/.docker/config.json

Credential helpers are supported if configured in the Docker config.

This enables krust to:
- Pull private base images
- Push to authenticated registries
- Support various auth methods (basic, token, oauth2)

Closes #2

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 09:19:04 -04:00
Jason Hall
4522e79c81
Merge pull request #8 from imjasonh/dependabot/cargo/dirs-6.0 2025-06-08 01:10:20 -04:00
dependabot[bot]
fcb4ef15f8
chore(deps): Update which requirement from 6.0 to 8.0
Updates the requirements on [which](https://github.com/harryfei/which-rs) to permit the latest version.
- [Release notes](https://github.com/harryfei/which-rs/releases)
- [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/harryfei/which-rs/compare/6.0.0...8.0.0)

---
updated-dependencies:
- dependency-name: which
  dependency-version: 8.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-08 05:03:46 +00:00
dependabot[bot]
a97ceda0ee
chore(deps): Update dirs requirement from 5.0 to 6.0
---
updated-dependencies:
- dependency-name: dirs
  dependency-version: 6.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-08 05:03:35 +00:00
Jason Hall
d4b7b216df
Fix flaky tests with temp directories and update documentation
This commit eliminates test flakiness by building to unique temporary
directories and updates the README to reflect all changes in this branch.

Code changes:
- Modified RustBuilder to use tempfile::tempdir() for each build
- Added BuildResult struct to keep temp directory alive during image build
- Each build now gets its own isolated target directory
- Removed clean_example_dir() and all cleanup logic - no longer needed
- Tests can now run concurrently without interfering with each other

Documentation updates:
- Added "Isolated builds" and "Concurrent builds" to key features
- Added comprehensive "Build Process" section explaining the temp directory approach
- Updated multi-arch documentation to reflect default behavior (builds both platforms)
- Added "Multi-Architecture Images" section explaining how multi-arch works
- Documented that manifest list support is planned for future release

Benefits:
- No more "Built binary not found" errors
- Tests run reliably every time
- Concurrent test execution is now safe
- Simpler test code without cleanup logic
- Clear documentation of build isolation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 23:13:45 -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