  Motivated by problems on the \'etale cohomology of Rapoport--Zink spaces and
their generalizations, as well as Fargues's geometrization conjecture for the
local Langlands correspondence, we develop a six functor formalism for the
\'etale cohomology of diamonds, and more generally small v-stacks on the
category of perfectoid spaces of characteristic $p$. Using a natural functor
from analytic adic spaces over $\mathbb Z_p$ to diamonds which identifies
\'etale sites, this induces a similar formalism in that setting, which in the
noetherian setting recovers the formalism from Huber's book.
