The paper contains a survey of results on the role of various rearrangement-invariant function spaces in Sobolev embeddings with particular emphasise on their optimality.