  The production of heavy-flavour hadrons in high-energy hadronic collisions is
a unique source of information on various aspects of quantum chromodynamics
(QCD). Production of heavy-flavour hadrons in proton--proton collisions allows
the test of perturbative QCD models, while the comparison of mesons and baryons
with heavy-flavour quarks can differentiate between fragmentation scenarios.
Multiplicity-dependent measurements allow for the understanding of semi-hard
vacuum QCD effects, as well as to study the coalescence mechanisms of
heavy-flavour quarks with light and strange quarks. Recent results from the
ALICE experiment in proton--proton collisions on the production of D mesons and
leptons from the decay of heavy-flavour hadrons, as well as charmed baryons,
are presented in this contribution. Furthermore, the multiplicity dependence of
self-normalised heavy-flavour electron yields, as well as that of strange to
non-strange D-meson and charmed baryon-to-meson ratios are also shown.
