The tools required to manufacturer rifling in traditional ways are highly cost prohibitive. Electro-Chemical Machining (ECM) is a method where it can be done for very cheap.
ECM is used by employing saltwater, an electric current, and conductive material to rust groves into a blank barrel in a controlled manner. This conductive material is wrapped around a jig (like shown below) which is then placed into the blank to guide the oxidation, and form rifling.
Traditionally barrels are made by cutting, forging, buttoning, or broaching.
That 1st pic was really missing something…
Missing something else too…
Perfect! I was too lazy to attempt this on my phone…