In our research we use rigid-body dynamics and optimal control methods to generate 3-D whole-body walking motions. For the dynamics modeling and computation we created RBDL-the Rigid Body Dynamics Library. It is a self-contained free open-source software package that implements state of the art dynamics algorithms including external contacts and collision impacts. It is based on Featherstone's spatial algebra notation and is implemented in C++ using highly efficient data structures that exploit sparsities in the spatial operators. The library contains various helper methods to compute quantities, such as point velocities, accelerations, Jacobians, angular and linear momentum and others. A concise programming interface and minimal dependencies makes it suitable for integration into existing frameworks. We demonstrate its performance by comparing it with state of the art dynamics libraries both based on recursive evaluations and symbolic code generation.