  The Andromeda Galaxy (M31) is a nearby ($\sim$780 kpc) galaxy similar to our
own Milky Way. Observational evidence suggests that it resides in a large halo
of dark matter (DM), making it a good target for DM searches. We present a
search for gamma rays from M31 using 1017 days of data from the High Altitude
Water Cherenkov (HAWC) Observatory. With its wide field of view and constant
monitoring, HAWC is well-suited to search for DM in extended targets like M31.
No DM annihilation or decay signal was detected for DM masses from 1 to 100 TeV
in the $b\bar{b}$, $t\bar{t}$, $\tau^{+}\tau^{-}$, $\mu^{+}\mu^{-}$, and
$W^{+}W^{-}$ channels. Therefore we present limits on those processes. Our
limits nicely complement the existing body of DM limits from other targets and
instruments. Specifically the DM decay limits from our benchmark model are the
most constraining for DM masses from 25 TeV to 100 TeV in the $b\bar{b},
t\bar{t}$ and $\mu^{+}\mu{-}$ channels. In addition to DM-specific limits, we
also calculate general gamma-ray flux limits for M31 in 5 energy bins from 1
TeV to 100 TeV.
