Skip to content

feat: cache steps and export post-build metadata - #2765

Open
wolfv wants to merge 3 commits into
feat/packaged-build-step-providersfrom
feat/build-step-cache-outputs
Open

feat: cache steps and export post-build metadata#2765
wolfv wants to merge 3 commits into
feat/packaged-build-step-providersfrom
feat/build-step-cache-outputs

Conversation

@wolfv

@wolfv wolfv commented Aug 25, 2026

Copy link
Copy Markdown
Member

Stack

3 of 4 in the experimental build-steps series.

Summary

Add persistent named-step caching and a line-oriented post-build metadata protocol.

Step caching

  • expose RATTLER_BUILD_STEP_CACHE
  • support hash- and mtime/size-based input/output declarations
  • store executor-owned .state.json identities
  • invalidate on script, cwd, effective environment, secrets, dependency solution, declarations, and missing outputs
  • replay generated metadata on cache hits and remove stale outputs deterministically
  • frame hashed paths/content to avoid ambiguous fingerprints

Post-build metadata

  • expose per-section OUTPUT_FILE
  • accept simple cat-friendly dotted paths with JSON values for arrays and objects
  • update run requirements, run constraints, every run-export category, about, licenses, file selection, prefix handling, dynamic-linking settings, and post-processing
  • reject build/host mutations after their environments have already been solved
  • synchronize emitted requirements into package metadata

Examples and documentation

  • add a cross-platform cache example demonstrating hits and invalidation
  • document the output protocol and mutable fields

Validation

  • cargo check --all-targets
  • cargo clippy --all-targets -- -D warnings
  • focused cache and recipe-output unit tests
  • 5 layer-specific build-step/cache/output E2E tests
  • cargo fmt --all --check
  • git diff --check

Full cross-platform end-to-end coverage additionally runs on the top PR, #2767.

@wolfv wolfv changed the title feat/build step cache outputs feat: cache steps and export post-build metadata Aug 25, 2026
@wolfv
wolfv force-pushed the feat/build-step-cache-outputs branch from f44f352 to 9f364bf Compare August 25, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant