Expand description
Management of the global Water home and per-project managed backend build cache.
Playground projects store generated backends under
~/.water/build_cache/<absolute-project-path>/managed_backends/ instead of
scattering .water directories into user projects. Compiled Cargo artifacts
live in the sibling ~/.water/build_cache/target/ — one directory shared by
every project, so a machine compiles each dependency revision once no matter
how many projects use it. The price of that sharing is serialization: Cargo
takes one build-directory lock per target, so concurrent water invocations
on different projects build one at a time — the second reports Blocking waiting for file lock on build directory, which the piped progress render
surfaces rather than swallowing — instead of each compiling the same
dependency graph in parallel. Sharing wins overall for the workflows the
CLI targets, where the alternative is N cold framework compiles.
Structs§
- Build
Cache Config - Cleanup policy for the global managed build cache.
- Build
Cache Entry Usage - On-disk usage of one managed build-cache entry.
- Build
Cache GcSummary - Summary of one managed build-cache garbage-collection pass.
- Build
Cache Usage Report - What the managed build cache is currently spending disk on.
- Home
DirError - The current user’s home directory could not be determined.
- Water
Config - Global Water CLI configuration persisted to
~/.water/config.toml.
Enums§
- Build
Cache GcOutcome - Result of attempting to garbage-collect stale managed build-cache entries.
Constants§
- CLI_
COMMIT - The CLI commit hash embedded at build time.
Functions§
- build_
cache_ container_ for - Return the whole managed cache container for a project directory, which need not exist.
- build_
cache_ root - Return the global managed build-cache root at
~/.water/build_cache. - cleanup_
stale_ build_ caches_ for_ project - Garbage-collect stale managed build-cache entries while preserving the current project’s cache.
- ensure_
global_ config - Ensure
~/.water/config.tomlexists and return the parsed configuration. - ensure_
project_ build_ cache - Ensure the managed build-cache directory exists for a project and return it.
- project_
build_ cache_ dir - Return the managed build-cache directory for a project.
- remove_
project_ build_ cache - Remove the managed build cache for a project.
- remove_
shared_ target_ dir - Remove the shared Cargo target directory every project’s builds write
into, returning the disk space it held —
Nonewhen no shared target exists. - shared_
host_ target_ dir - Return the shared target directory host-side rlib builds use.
- shared_
target_ dir - Return the Cargo target directory every project’s CLI-managed builds share, creating it if needed.
- survey_
build_ cache_ usage - Survey the managed build cache without removing anything.
- water_
home_ dir - Return the Water home directory root at
~/.water. - water_
home_ dir_ in - Return the Water home directory root at
~/.waterforhost. - write_
global_ config - Persist
configto~/.water/config.toml.