Files in Target Directory
cargo-maelstrom stores a number of
files in the workspace’s target directory, under the maelstrom subdirectory.
This chapter lists them and explains what they’re for.
It is safe to remove this directory whenever cargo-maelstrom isn’t running.
Except in the case of the local worker, cargo-maelstrom doesn’t currently make
any effort to clean up these files. However, the total space consumed by these
files should be pretty small.
cargo-maelstrom also uses the
container-images cache. That cache is not stored in
the target directory, as it can be shared by different Maelstrom clients.
Local Worker
The local worker stores its cache in maelstrom/cache/local-worker/ in the
target directory. The cache-size configuration value
indicates the target size of this cache directory.
Manifest Files
cargo-maelstrom uses “manifest
files” for non-tar layers. These are like tar files, but without the actual
data contents. These files are stored in maelstrom/cache/manifests/ in the
target directory.
File Digests
Files uploaded to the broker are identified by a hash of their file contents.
Calculating these hashes can be time consuming so cargo-maelstrom caches this information. This cache is stored
in maelstrom/cache/cached-digests.toml in the target directory.
Test Listing
When cargo-maelstrom finishes, it
updates a list of all of the tests in the workspace, and how long they took to
run. This is used to predict the number of tests that will be run in subsequent
invocations, as well as how long they will take. This is stored in the —
maelstrom/state/test-listing.toml — file in
the target directory.