Expand description
Cache path helpers and installed-routine discovery.
Routines are stored under ProjectDirs::cache_dir():
cache/routines/<name>/<version>/<target_triple>/plugin/<library>
cache/routines/<name>/<version>/<target_triple>/descriptor.json§Version resolution
find_latest_installed_version and default run behavior use lexicographic sorting on
version directory names. The last sorted entry is treated as “latest”. This is not
semver-aware (e.g. 1.9.0 sorts after 1.10.0). Pin versions with run <name>@<version>.
Functions§
- cache_
root - Root cache directory (
proj_dirs.cache_dir()). - descriptor_
path - Path to
descriptor.jsonfor an installed routine version and target. - find_
latest_ installed_ version - Lexicographically greatest installed version directory name, if any.
- host_
target_ triple - Host target triple from
rustc -vV(host:line). - installed_
routine_ names - Sorted routine names that have at least one installed version directory.
- installed_
versions_ for_ routine - Version directory names for a routine, sorted lexicographically.
- is_
installed_ for_ target - Whether the plugin library file exists for the given routine, version, and target.
- platform_
library_ filename - Platform-specific dynamic library filename for a routine name stem.
- plugin_
dir cache/routines/<name>/<version>/<target_triple>/plugin.- plugin_
library_ path - Full path to the installed plugin dynamic library file.
- routine_
root cache/routines/<name>.- routine_
target_ root cache/routines/<name>/<version>/<target_triple>.- routine_
version_ root cache/routines/<name>/<version>.- routines_
root cache/routines— parent of all installed routine names.