A few ways to protect hardware from rusting are: blocking moisture and storing them in a dry place, wrapping items in plastic, applying oil, galvanising, etc.