  Let $X$ be a curve of genus $g\geq 2$ over a number field $F$ of degree $d =
[F:Q]$. The conjectural existence of a uniform bound $N(g,d)$ on the number
$\#X(F)$ of $F$-rational points of $X$ is an outstanding open problem in
arithmetic geometry, known by [CHM97] to follow from the Bombieri--Lang
conjecture. A related conjecture posits the existence of a uniform bound
$N_{{\rm tors},\dagger}(g,d)$ on the number of geometric torsion points of the
Jacobian $J$ of $X$ which lie on the image of $X$ under an Abel--Jacobi map.
For fixed $X$ this quantity was conjectured to be finite by Manin--Mumford, and
was proved to be so by Raynaud [Ray83].
  We give an explicit uniform bound on $\#X(F)$ when $X$ has Mordell--Weil rank
$r\leq g-3$. This generalizes recent work of Stoll on uniform bounds on
hyperelliptic curves of small rank to arbitrary curves. Using the same
techniques, we give an explicit, unconditional uniform bound on the number of
$F$-rational torsion points of $J$ lying on the image of $X$ under an
Abel--Jacobi map. We also give an explicit uniform bound on the number of
geometric torsion points of $J$ lying on $X$ when the reduction type of $X$ is
highly degenerate.
  Our methods combine Chabauty--Coleman's $p$-adic integration, non-Archimedean
potential theory on Berkovich curves, and the theory of linear systems and
divisors on metric graphs.
