In this contribution, the latest $\rm \Lambda_c$, $\rm \Xi_{c}^{0}$ and the first $\rm \Xi_{c}^{+}$, $\rm \Sigma_{c}^{0,++}$ and $\rm \Omega_{c}^{0}$ baryon measurements performed with the ALICE detector at midrapidity in proton--proton collisions at $\sqrt{s}=5.02\,$TeV and $13\,$TeV at the LHC are presented. Recent measurements of baryon-to-meson cross-section ratios at midrapidity show significantly higher results than in $\rm e^{+}e^{-}$ and ep collisions, suggesting that the fragmentation of charm is not universal across different collision systems. Thus, measurements of charm-baryon production are crucial to study the charm-quark hadronisation in pp collisions and the possible difference with respect to $\rm e^{+}e^{-}$ and ep collisions.
In addition, the baryon-production measurements were essential for the measurement of the c$\bar{\rm c}$ production cross section performed by ALICE at midrapidity in pp collisions and also presented in this contribution.
Furthermore, the new preliminary measurement of the $\rm \Lambda_c$/$\rm D^0$ ratio in $0 \leq p_{\rm T} < 1$ $\rm {GeV/}c$ in p--Pb collisions will be discussed. The measurement of charm baryons in proton--nucleus collisions provides important information about Cold Nuclear Matter (CNM) effects. It also helps to understand how the possible presence of collective effects could modify the production of heavy-flavour hadrons and to interpret the similarities observed among pp, proton--nucleus and nucleus--nucleus systems.