In Rudin (Principles of Mathematical Analysis page 162), the Stone-Weierstrass theorem is proven assuming we have an algebra $\mathscr{A}$ of continuous functions on a compact set $K$ which vanishes nowhere and separates points, and it is clear that the uniform closure of $\mathscr{A}$, say $\mathscr{B}$, contains all continuous functions $K \rightarrow \mathbb{R}$.
I am reading a probability textbook that makes use of the following extension for functions on $\mathbb{R}^d$ for some $d \ge 1$, in order to prove the uniqueness of characteristic functions:
Suppose that $\mathscr{A}$ is an algebra of continuous functions (from $\mathbb{R}^d \rightarrow \mathbb{R}$) which vanish at infinity (i.e. $\lim_{\|x\| \rightarrow \infty} f(x) = 0 \quad \forall f \in \mathscr{A}$), separates points, and vanishes nowhere. Then the uniform closure of $\mathscr{A}$, which we denote $\mathscr{B}$ again, contains all continuous functions on $\mathbb{R}^d$ which vanish at infinity.
How do we extend the result from Rudin to this generalized form on $\mathbb{R}^d$? The proof in Rudin makes very heavy use of the compactness assumption on $K$, so I'm not really sure how to reconcile this.
My ideas (you may ignore these, particularly if you know how to solve the problem):
Denote $C_0(\mathbb{R}^d, \mathbb{R}) \equiv \{f: \mathbb{R}^d \rightarrow \mathbb{R} : f \text{ is continuous, vanishes at infinity}\}$
It is obviously true that if we allow $f \in C_0(\mathbb{R}^d, \mathbb{R})$, $f$ is continuous on any compact set $K \subseteq \mathbb{R}^d$ and $\mathscr{A}$ is an algebra of functions which are continuous on $K$ that satisfy the assumptions required from Rudin so there exists a sequence $f_n \in \mathscr{A}$ which converges to $f$ uniformly on $K$.
However, this does not mean $f \in \mathscr{B}$, since we don't know if $f_n \rightarrow f$ uniformly $\mathbb{R}^d$, only that the convergence is uniform on $K$.