  Atmospheres are products of time-integrated mass exchange between the surface
of a planet and its interior. On Earth and other planetary bodies, magma oceans
likely marked significant atmosphere-forming events, during which both steam-
and carbon-rich atmospheres may have been generated. However, the nature of
Earth's early atmosphere, and those around other rocky planets, remains unclear
for lack of constraints on the solubility of water in liquids of appropriate
composition. Here we determine water solubility in 14 peridotite liquids,
representative of Earth's mantle, synthesised in a laser-heated aerodynamic
levitation furnace. We explore oxygen fugacities (fO$_2$) between -1.9 and +6.0
log units relative to the iron-w\"ustite buffer at constant temperature
(2173$\pm$50 K) and total pressure (1 bar). The resulting fH$_2$O ranged from 0
to 0.027 bar and fH$_2$ from 0 to 0.064 bar. Total H$_2$O contents were
determined by transmission FTIR spectroscopy from the absorption band at
3550cm$^{-1}$ and applying the Beer-Lambert law. The mole fraction of water in
the liquid is $\propto$ (fH$_2$O)$^{0.5}$, attesting to its dissolution as OH.
The data are fit by a solubility coefficient of 524$\pm$16 ppmw/bar$^{0.5}$,
for a molar absorption coefficient, $\epsilon_{3550}$, of 6.3$\pm$0.3 m$^2$/mol
in basaltic glasses or 647$\pm$25 ppmw/bar$^{0.5}$, with $\epsilon_{3550}$ =
5.1$\pm$0.3m$^2$/mol for peridotitic glasses. These solubility constants are
10-25 % lower than those for basaltic liquids at 1623 K and 1 bar. Higher
temperature lowers water solubility, offsetting the greater depolymerisation of
peridotite melts that would otherwise increase H$_2$O solubility relative to
basaltic liquids. Because the solubility of water remains high relative to that
of CO$_2$, steam atmospheres are rare, although they may form under oxidising
conditions on telluric bodies, provided high H/C ratios prevail.
