A porous Ru nanomaterial as an efficient electrocatalyst for the hydrogen evolution reaction under acidic and neutral conditions.