A lattice is topologically locally rigid (t.l.r) if small deformations of it are isomorphic lattices. Uniform lattices in Lie groups were shown to be t.l.r by Weil [‘60]. We show that uniform lattices in any compactly generated topological group are t.l.r. A lattice is locally rigid (l.r) if small deformations arise from conjugation. It is a classical fact due to Weil [‘62] that lattices in semi-simple Lie groups are l.r. Relying on our t.l.r results and on recent work by Caprace-Monod we prove l.r for uniform lattices in the isometry groups of certain $CAT(0)$ spaces, with the exception of $SL_2(R)$, which occurs already in the classical case. In the talk I will explain the above notions and results, and present some geometric ideas from the proofs. This is a joint work with Tsachik Gelander.