We are concerned with the dependence of the lowest positive eigenvalue of the Dirac operator on the geometry of rectangles, subject to infinite-mass boundary conditions. It is shown that the square is the global minimiser both under the area or perimeter constraints. Contrary to well-known non-relativistic analogues, the present spectral problem does not admit explicit solutions. Our approach is based on a variational re-formulation, symmetries of the rectangles and a trick passing through a non-convex minimisation problem. We leave as an open problem whether the square is the only minimiser of these spectral-optimisation problems.