Oh, gosh...I really, really struggled with this. My older son, Jake, was SUCH a runner! When we would go to a playground, all of the other little ones stayed pretty close to their mothers. Not my kid! His goal was always the center line of the road. Seriously. If you called his name or shouted, he just laughed and ran faster.
We don't (have never) used any kind of physical punishment and my parents kinda gave me a hard time about it with lots of "if you spanked him once, he wouldn't do that anymore" comments. I even had a couple of "spanked is better than hit by a car" conversations with my husband.
Ultimately there was no easy solution. We carried him, used the stroller when he was agreeable to it, held his hand and occasionally used a harness/leash. I talked with him over and over and over and over about WHY he shouldn't run and I looked for places where he *could* run safely and I explained the difference between the two.
One day, he just *got it* and our younger son was never a problem.
This too shall pass, until then...wear running shoes

Oh! The other day, we were crossing a busy road and I grabbed Jake's hand. Except that *I* hold his wrist/forearm. He asked why I've always done that and got the whole "when you were little you used to run away from me" story. I started holding his wrist back then because if we held hands, he would just let go and run away before I could react. Holding his wrist didn't give him that option. I had to chuckle as I didn't realize that I was still doing that.