We study a system of hard rods of finite size in one space dimension, which move by Brownian noise while avoiding overlap. We consider a scaling in which the number of particles tends to infinity while the volume fraction of the rods remains constant; in this limit the empirical measure of the rod positions converges almost surely to a deterministic limit evolution. We prove a large-deviation principle on path space for the empirical measure, by exploiting a one-to-one mapping between the hard-rod system and a system of non-interacting particles on a contracted domain. The large-deviation principle naturally identifies a gradient-flow structure for the limit evolution, with clear interpretations for both the driving functional (an ‘entropy’...