Motivated by work of Cohn and Schofield on Sylvester rank functions, Chuang and Lazarev have recently introduced the notion of a rank function on a triangulated category. They show that Verdier quotients into simple triangulated categories are classified by a certain type of rank functions, and that such rank functions on the perfect derived category of a dg algebra describe derived localisations into dg skew-fields. In this talk, we suggest interpreting rank functions as certain additive functions on the functor category. As a consequence, we obtain that every integral rank function decomposes uniquely as a sum of irreducible ones. In the following, we focus on compactly generated triangulated categories, where basic rank functions on the compacts are length functions with respect to certain endofinite objects. We show that rank functions in this context are closely related to definable subcategories and smashing localisations, which allows us to extend the aforementioned results by Chuang and Lazarev. This talk is based on joint work with Teresa Conde, Mikhail Gorsky and Alexandra Zvonareva.