Do you have bears to consider? What about feral cattle? What kind of pigs .. how big? (Wild boar vs javelina, basically.)
I grew up in a bear preserve. Based on decades of near constant contact, I've formed the opinion that people who think the 10mm or any other semi-auto short of the .44 auto mag, .45 winchester mag, or .50 AE for "bear protection" have absolutely not a brain cell in their skull. People certainly have defended themselves successfully with lesser guns / cartridges but those are fortunate accidents, the things that happen to other people, not to me. I always draw the crappy end of the stick and have to deal with worst case, not best case, situations.
Feral cattle .. not something most people think about. For the most part, beef cow breeds are not too bad but some of the dairy breed bulls were born waking up on the wrong side of the bed and seem to hunt trouble. They can hurt you .. bad. And big, upwards of a ton. Fast .. often long, lean critters, not ones with little stubby legs. And horns.
Feral pigs ... not javelina ... can be very aggressive and very dangerous.
With any of those, I would skip the semi-autos. There are a very few semi-autos that will handle sufficiently powerful cartridges but they are typically very bulky, very heavy, and, other than perhaps the Desert Eagle, rare. Stick with a revolver. Which one ... depends on your hands. What fits me comfortably may not fit you at all. For me the most comfortable to shoot are single action revolvers. I'd suggest if you're not a big time handgun guy, keep it simple and get a .44 magnum .. Ruger super blackhawk. There are other options but truly suitable ammo is harder to find. Then practice, practice, practice. I've put upwards of 50K rounds downrange through my various .44s. If you like double action, stick with S&W or Ruger. Watch out for the S&W 329PD. I have one, love to carry it, HATE shooting it. It is the most vicious recoiling thing I've ever laid hands on. But it is sure sweet to pack when backpacking and ounces count.
If you don't have to consider any of those critters, then the choices get simpler. Most of the conventional self defense semi auto cartridges .. or at least the larger ones, say 9mm, .40, 10mm, and .45 .. will handle cougars and anything smaller. Same with .357 revolvers. In fact, I had a little go-around with a cougar in our yard about a month ago which lead to a dead cougar. I would not have intentionally started things with a snubby 5 shot revolver but since that's what I had in the moment, that's what I used .. the cat is dead and I'm not. "I approve of this outcome." I probably would not drop down to the .38 special, .380 ACP or any of the .32s. So far as guns, my hands don't fit Glocks, otherwise they'd be first choice. Among 9mms, I'm shopping for a compact CZ75. I'd take a Browning HiPower. .45s or 10mm .. a 1911 design. .40 same as 9mms, probably Glock if they fit your hands. For .357, I like the S&W J, K, and L frames .. N frame for that matter but they're heavy, or Ruger SP101 or GP100 .. or a Redhawk but again, they're heavy for what you get.
So that's "in general."
What I do .. mostly I carry a little 4-5/8" barreled Ruger Super Blackhawk or a 4" barreled S&W 329PD, both .44 magnums, even shoot the same shells in both .. when I'm hiking or fishing. If I wake up and have a twitchy feeling about where I'm headed, I set them aside and grab my .454 Casull. It is a beast .. and will handle anything in my area with authority. It'll also handle big bears but the margin is thinner. When I'm just out walking in my neighborhood, usually I pack the J-frame S&W (M60, 3" barrel, adjustable sights, .357) that I had when I tangled with the cougar. For some reason I can't explain, though too small (physically) it fits me .. I shoot it well and I have a lot of confidence in it.
MIB