We give a short overview over recent work on finding constraints on partition functions of 2d CFTs from modular invariance. We summarize the constraints on the spectrum and their connection to Calabi-Yau compactifications.