We develop a mathematical theory for a class of compressible viscoelastic rate-type fluids with stress diffusion. Our approach is based on the concepts used in the nowadays standard theory of compressible Newtonian fluids as renormalization, effective viscous flux identity, compensated compactness.
The presence of the extra stress, however, requires substantial modification of these techniques, in particular, a new version of the effective viscous flux identity is derived. With help of these tools, we show the existence of global-in-time weak solutions for any finite energy initial data.