diff --git a/rust/Earthfile b/rust/Earthfile index 7fee9df..f370cda 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -72,16 +72,16 @@ CARGO: # Notice that in order to run this function, +INIT must be called first. This function exports the target cache mount ID under the env entry: $TARGET_CACHE_ID. # Arguments: # - command (required): Command to run, can be any expression. -# - cargo_home_cache_id: ID of the cargo home cache mount. By default: $CARGO_HOME_CACHE_ID as exported by +INIT -# - target_cache_id: ID of the target cache mount. By default: ${CARGO_HOME_CACHE_ID}#${EARTHLY_TARGET_NAME} +# - EARTHLY_CARGO_HOME_CACHE_ID: ID of the cargo home cache mount. By default: $EARTHLY_CARGO_HOME_CACHE_ID as exported by +INIT +# - target_cache_id: ID of the target cache mount. By default: ${EARTHLY_CARGO_HOME_CACHE_ID}#${EARTHLY_TARGET_NAME} # RUN_WITH_CACHE: COMMAND DO +CHECK_INITED ARG --required command ARG EARTHLY_TARGET_NAME - ARG cargo_home_cache_id = $CARGO_HOME_CACHE_ID - ARG target_cache_id="${CARGO_HOME_CACHE_ID}#${EARTHLY_TARGET_NAME}" + ARG cargo_home_cache_id = $EARTHLY_CARGO_HOME_CACHE_ID + ARG target_cache_id="${EARTHLY_CARGO_HOME_CACHE_ID}#${EARTHLY_TARGET_NAME}" # Save to restore at the end. ARG ORIGINAL_CARGO_HOME=$CARGO_HOME ARG ORIGINAL_CARGO_INSTALL_ROOT=$CARGO_INSTALL_ROOT