smalldocs 0.5.13

The rustdoc cache cleans itself

Author

Rahul Dave

Published

November 22, 2026

For a Rust reference, smalldocs runs rustdoc in a cache folder, in the temporary folder of the computer. The cache holds one folder for each Cargo.toml, with the crates that the build compiled, up to about 350 MB each. A worktree has its own Cargo.toml, so each worktree got its own folder. Before, smalldocs never removed one. On one computer with many worktrees, the cache grew to 6 GB.

smalldocs 0.5.13 now marks each folder with the path of its Cargo.toml. Once a day, a build removes the folders of other crates:

A folder from 0.5.12 or older has no mark, so only its age counts. Each build writes the output of rustdoc in it, so a folder that 0.5.12 still uses is kept.

What changes for a site that uses none of it

No page changes, apart from the version in the tag <meta name="generator">. The first build of a removed folder’s crate compiles its crates again, as a first build always does.