Skip to main content

Crate morph_cache

Crate morph_cache 

Source

Structs§

RuntimeManifest
Write a manifest inside cached runtime for verification

Functions§

download_runtime
Download runtime from GitHub Releases
fetch_latest_runtime_version
Fetch latest version from GitHub via versions/ files or API
fingerprint_inputs
Compose a fingerprint over a set of (relative_path, content) inputs. The hashes are fed through a final digest so file additions/removals and ordering changes are reflected. inputs earlier in the slice must map to distinct paths; content may be empty for files that were deleted.
global_cache_root
Global cache root: ~/.morph/
global_runtime_version_dir
global_runtimes_dir
hash_tree
Hash all files under dir (relative path + content). Returns an empty string if the directory does not exist. Hidden/.git contents are skipped so unrelated files (e.g. cached build artifacts) don’t force rebuilds.
is_project_runtime_installed
Check if project has runtime installed
is_runtime_cached
Check if a runtime version is cached globally
link_runtime_to_project
Link or copy global cache to project .morph/runtime
project_hash_dir
Project build-hash dir: /.morph/hash
read_stored_fingerprint
Read the previously stored fingerprint for binary_name, if any.
sha256_bytes
Compute sha256 of bytes
sha256_file
Compute sha256 of a file
sha256_string
Compute sha256 of a string
write_lock_file
Create morph.lock file
write_stored_fingerprint
Store the fingerprint for binary_name under /.morph/hash.