Completion as a functor between topological rings
Separated completions are available more generally for uniform spaces, a reference is Bourbaki's Topologie générale, Chapter II, Paragraph 3. Here are some details:
Let $X$ be a uniform space. If $V$ is an entourage of $X$, then a subset $A \subseteq X$ is called small of order $V$ when $A \times A \subseteq V$. A filter on $X$ is called a Cauchy filter if it contains a small set of order $V$ for every entourage $V$. Cauchy filters which are minimal with respect to $\subseteq$ constitute a set $\widehat{X}$, which actually carries a uniform structure. A fundamental system of entourages is given by those sets of minimal Cauchy filters which contain a given small set of order $V$, where $V$ is an entourage on $X$. Then $X \mapsto \widehat{X}$ is a functor which is left adjoint to the functor from separated complete uniform spaces to uniform spaces.
The completion is compatible with products, so that it restricts to the completion of uniform algebraic structures. The case of topological abelian groups (which admit a canonical uniform structure) is treated in loc. cit., Chapter III, Paragraph 3. This can also be applied to topological rings.