Skip to main content

Module final_compile

Module final_compile 

Source
Expand description

Plan-sensitive final Cargo compilation and execution for RSJS roots.

The final compiler is intentionally separate from descriptor compilation. A content-addressed plan is validated before Cargo starts, its PlanId is supplied to the final rustc wrapper. Artifacts share a wrapper-policy target namespace; generated RSJS witnesses expose the exact plan/map fingerprints to Cargo so only plan-sensitive units are invalidated.

Structs§

FinalCargoArtifactReport
Path-free report for one final Cargo artifact.
FinalCargoOutput
Successful plan-sensitive Cargo output.
FinalCargoRequest
One root-specific final Cargo invocation.
FinalSnapshotLease
Shared hold on one published executable snapshot.

Enums§

FinalCargoError
Final-compilation validation or Cargo failure.
ManagedPathError
Failure to confine a final-build path beneath its trusted generated-output boundary using only ordinary directories and regular files.

Constants§

FINAL_PHASE_ENV
Marks rustc as running the linked final phase.
FINAL_PLAN_FILE_HASH_ENV
Tagged SHA-256 digest of the exact linked-plan bytes.
FINAL_PLAN_ID_ENV
Lower-case hexadecimal strong plan identity.
FINAL_PLAN_PATH_ENV
Exact content-addressed link-plan path consumed by final macro expansion.

Traits§

FinalCargoPlan
Linked-plan variants accepted by the final Cargo runner.

Functions§

prune_final_artifact_snapshot
Remove one executable snapshot published by this module unless another process still holds its lease. Returns whether the snapshot was removed.
run_final_cargo
Validate the plan and run one final, compile-only Cargo invocation.
snapshot_wrapper_executable
Publish the exact wrapper bytes into the generated-output CAS before Cargo is allowed to reopen an executable path.