Use some kind of galvanized wire mesh. I have found that welded wire lasts far longer -- many years, in fact -- whereas hardware cloth rusts away quite quickly. I used 1/2 x 1 inch welded wire mesh for the flooring in my wild animal cages. For the comfort of the animals' feet, I buried the wire. It was still solid after 10 years. (And that was 10 years of Oregon rain!
The water pipes that bring water to your home are probably galvanized. It's a zinc coating, and not something I worry about causing problems if it were to leach into the soil. Heavy zinc deposits are problematic in soil, but they usually aren't the result of leaching from galvanized metals. JMO.