  We develop the theory of Yoneda Ext groups over a ring in homotopy type
theory (HoTT) and describe their interpretation into an $\infty$-topos. This is
an abstract approach to Ext groups which does not require projective or
injective resolutions. While it produces group objects that are a priori large,
we show that the $\operatorname{Ext}^1$ groups are equivalent to small groups,
leaving open the question of whether the higher Ext groups are essentially
small as well. We also show that the $\operatorname{Ext}^1$ groups take on the
usual form as a product of cyclic groups whenever the input modules are
finitely presented and the ring is a PID (in the constructive sense).
  When interpreted into an $\infty$-topos of sheaves on a 1-category, our Ext
groups recover (and give a resolution-free approach to) sheaf Ext groups, which
arise in algebraic geometry. (These are also called "local" Ext groups.) We may
therefore interpret results about Ext from HoTT and apply them to sheaf Ext. To
show this, we prove that injectivity of modules in HoTT interprets to internal
injectivity in these models. It follows, for example, that sheaf Ext can be
computed using resolutions which are projective or injective in the sense of
HoTT, when they exist, and we give an example of this in the projective case.
We also discuss the relation between internal $\mathbb{Z} G$-modules (for a
$0$-truncated group object $G$) and abelian groups in the slice over $BG$, and
study the interpretation of our Ext groups in both settings.
